Storing data in shift registers is always more preferable than a global variable. Whenever you call a global you are making a copy of your data.. Also with global variables because you have copies you can get into race conditions.
Here is an article on NI's website regarding global variables.
A more elegant way to pass data around your program is a
functional global variable.