How do I save and retrieve ordered data? Can I do this with an array?

I am creating a virtual environment for a neuroscience experiment. Participants will need to navigate to stores within this virtual environment so that they can deliver items. They will later need to remember which stores they visited in what order. Therefore, I need to store data on the order in which subjects visited the stores. I was thinking that I could save the list of stores they visited in an array, but I’m very new to scripting and am not coming up with a solution. Any help would be appreciated!

Generic lists are ordered. So you can add each one to the list as you go using:


and then, when you’re done, you can start going through them from first to last using a for loop or foreach loop.