You have to declare globals everywhere they need to be used, so that might be part of the issue.
If you declare it only in the stack script, the global is seen only in the stack script and its handlers.
For your button script to use the same global you need to declare it there also at which point the same global value can be seen/used/changed in both scripts.
You might consider using a property instead. If you "set the myproperty of this stack to "whatever value" you can get to it from anywhere without re-declaring.
Also, for learning the language, the users guide isn't bad.
You can find links to the dictionary online, the users guide, and the tutorial lessons here.
http://www.runrev.com/developers/documentation/
There is also some good stuff at
http://livecode.byu.edu/ There are additional useful links at that location also.
For your array questions, the lessons site (sub link from the top link above) has some array specific lessons.
Also, this lesson
http://lessons.runrev.com/s/lessons/m/4 ... -variables goes over alternatives to using globals and is a good read.
Then there is this
http://www.fourthworld.com/embassy/arti ... _path.html by richard gaskin that is a really great read on message path mechanics.