You could use an array to hold your global variables.
So if you will have 10 maximum ever needed at one time, create an array with x=10, y=1, z=1. Since you are asking for globals, I assume you will be using another layout to access them, so maybe have these layouts load the variable(s) it uses and test if valid, then take action. One way to make valid is if you only use positive values then set the variable = -1 when 'deleted'.
Another way would be to use any object that has 'instance variables' and set the object to global. Use the instance variables you create as described above.