cycling through an array

How do I set up an incrementing counter n

It looks like you are declaring i each time through loop() although it is impossible to be sure as you have not posted a complete program (HINT !)

Why mess around with 2 variables ? Just add 1 to the array index variable to move through the array