Tested this code, works how I believe you are looking for, if not let me know I will make changes where needed.
NOTE: This was tested with only 4 LED's, you will need to change the array and for loops according to your specifications (don't forget to change push button location!)
// Number of Button location
int buttonPin = 2;
// Array of where leds are
int ledPinArray[] = {10,11,12,13};
// Current location in array
int pos = 0;
// read button state
int buttonState = 0;
void setup() {
// initialize the LEDs as an output
for(int i = 0; i < 4; i++) { // Change 4 to length of array
pinMode(ledPinArray[i],OUTPUT);
}
// Accept inputs from button pin
pinMode(buttonPin, INPUT);
// Turn on the first LED
digitalWrite(ledPinArray[0],HIGH);
}
void loop(){
// read the state of the pushbutton
buttonState = digitalRead(buttonPin);
// if the button is preseed
if (buttonState == HIGH) {
// increment location in Array
pos++;
// if the location is higher than the length of the array, set it back to 0
if(pos >= 4) {
pos = 0;
}
// turn on next LED
digitalWrite(ledPinArray[pos], HIGH);
// Turns off last LED
if(pos!=0) { // If the current possition isnt the first in the row
digitalWrite(ledPinArray[pos-1], LOW);
} else { // If it is, turn off the last one
digitalWrite(ledPinArray[3],LOW);
}
// without this, it will change LED's faster than you can let go of the button
delay(100);
}
}