Ok, so I set an Array object to "not global" and my script didn't work as expected. I changed it back to "global" and everything was fine. My question is, how does that setting effect the array? I don't need it persisted across Layouts (although it's not a problem to delete all items on start of a new Layout.
Jack of all trades, and master of some.