Hi Arthur,
Modifying a container while iterating over it with a ranged-for has always been undefined behaviour, but happened to work with TArray. A change was made to optimise TArray’s ranged-for iteration which now prevents that case, so the assert was added to catch when you do that.
Using an index-based loop will be fine in your case.
Steve