Cycling through a whole array after button press

To summarize my current efforts, I have made a very basic program that, upon a button press, moves to the next section of a traffic light (starts on red, upon press goes to amber etc.), as each image for the traffic light is stored in an array. This does work as intended but I now need to change this code to make it so that upon a button press, rather than just going to the next thing in the array, it cycles through all of them for a certain amount of time, simulating a traffic light. I could not for the life of me find out where to start, and everything I have tried (