Eartbound Partner "NPC Follow Player" system? with arrays PLZ HELP

I want to store XY of player
I need help with arrays i have some images if anybody understands arrays help please thank you

simple drawing ig idk if this helps
Players XY and Animation direction are stored
Partner would follow lets say the 50th stored point
I need To delete data though so it doesnt like overflow??? and the point for the partner changes
idk i dont have experience with arrays


I know how to store it

How do i access this like lets say i wanted to access like number 10 to make a character go there


This is for a partner system like earthbound I watched Totorials for other game engines and im trying to recreate it in GD

Please do not post duplicates of threads you’ve already created.

If you have new information, you’re welcome to continue updating your original thread.