vtrix, the array isn't created until you activate the layout in which it is defined.
Assuming your initial layout (the one that starts up when you launch the game) is mainlayout, and that the array is defined in the editorlayout, then the array won't exist when you first start the game. It will be only be created once you've activated the editorlayout.
Once you activate the editorlayout, the array will be created, and will exist globally, no matter which layout you activate after that.
The solution is to define the array in the mainlayout, or create an initialize layout that initializes all of your global objects, then automatically switches to the desired initial layout.