The problem is much more complex than just moving array pointers around.
To get your code to work, you have to understand the nature of web-servers in general and the way how PHP works.
The moment you start pressing any buttons in the browser, there are no more array pointers, nor arrays, nor whole php instance ever exists. PHP-based web-server is stateless. Means PHP script, that has been used to display your page, is already died. While when pressing a button after that, you are invoking a completely different PHP instance, with its own arrays, pointers and stuff, that knows absolutely nothing of any previous calls.
Therefore, if you want to keep any state with you, you have to pass all the information to the browser. In your case - send the array position in the browser along with request and then send it back to PHP.
thus you have to get the current array position (initially it’s 0), and attach it to the button. Having received it through GET request you may add 1 to it and get the next position, like