It depends on how your loop is.
Essentially, you should have a Try/Catch surrounding your invokes/steps that perform the process. That way you can capture the exception and need for a retry. Make sure you use BusinessRuleExceptions to capture non-retry exceptions.
This strategy works well in a State Machine, because you can use transitions to check if an exception occurred, then go back to beginning again. However, you can also accomplish this in a Flowchart with a Decision. When an exception occurs, you will simply add 1 to a retry counter and check if it is less than the max retry number.
When it loops back around, you will use an index so you can either get the same item or the next item. If using ForEach to iterate your items, you would need to use the .Skip() method with the index. Or, if you use a counter-style loop (not a ForEach), just store each item using that index prior to going to process the item.
So, it depends on your approach.
If this is the first time you are thinking about this and have not attempted a retry mechanism before, then I suggest looking for the REFramework which is a template in Studio, and it comes with a pdf document explaining all its parts.
Performing a retry is just a matter of using logic. For example, if you are shooting freethrows in basketball, and you have 10 balls… each time you miss, you must go get the previous ball, then shoot it again. If you were only allowed 3 retries per ball, then you would just need to add 1 to retry until it reaches the 3rd retry, and reset it to zero each time you successfully make a ball. So, you can apply real logic to this.