Quick answer: Construct 3 Array For Each skipping the next element after a Delete? Iteration uses index-based traversal - delete shifts subsequent elements left, causing skip.
Inventory cleanup loop deletes expired potions. After running, half the expired ones are still there - the loop skipped them.
Iterate in reverse
Use Repeat Array.Width times, set index to Array.Width - 1 - loopindex. Walking from the back means deletes don't shift indices you haven't visited yet.
Or mark-then-sweep
First pass: set a 'delete' marker on each row. Second pass: filter the array down. Clearer semantics than mutating while iterating.
Avoid For Each + Delete
The combination is the bug. The fix is either of the above patterns, not 'try harder with For Each'.
“Mutating an array mid-iteration is a bug in every language. Construct 3's For Each is no exception.”
For frequent removals, a hashmap-backed dictionary outperforms an array. Construct 3 dictionaries are cheap and don't have the shift cost.