You can set the value of a global variable in any script which then can be used in any script or placed on any layout. If you need to store the data then you would use a global field.
And a global field is accessible from any script or layout in the file so you can define it in any table unless....
You also need to use it as a match field in a relationship. Then you have to define it in the table where you will define this relationship.