Loops that do not have a fixed number of iterations, for example, loops that depend on storage values, have to be used carefully: Due to the block gas limit, transactions can only consume a certain amount of gas. Either explicitly or just due to normal operation, the number of iterations in a loop can grow beyond the block gas limit which can cause the complete contract to be stalled at a certain point.
What happens if a scenario occurs where a loop grows beyond the block gas limit? particularly; for how long will the contract be stalled?
To extend, If only 50 out of 500 (a random number) values of an array were effected by the loop iteration, would the function which started the loop then be callable another 9 times and effect the remaining 450 values of the array or would it just continuously effect only the same first 50 out of the 500?
Finally, How does one mitigate against this properly when looping through storage values and not function parameter input arguments?