Global variables are persistent and can be referred to in any layout.
The persist behavior can be used to save or keep track of objects' information while switching back and forth between layouts.
Arrays are also persistent through layout changes and are an excellent way to keep track of structured data.
On start of layout will occur any time that layout loads. If you want it to run once only, use a variable (for example a boolean called "FirstLoaded"), add a second condition to your start of layout event to check if "FirstLoaded" is false, and add an action in that event to set "FirstLoaded" to true. After running the first time, the variable will be true and that event will never run again even if the layout start triggers again.