Hi
If the while-loop runs continously until user stopping it, Enable indexing will not work.
In that case, you need to find divide the iteration by the array size using Quotient & Remainder, and uses the Remainder to index out the corresponding array element.
Attached quick example code fyr.