The problem is that even when you create the mutable array, you are storing the reference to this array object in a variable in the context of the XUL that creates it. From the other XUL, you don't see that variable so you cannot access the array.
There are several solutions to access an object accross different contexts:
From one of the contexts, get a reference to the other context. For example, you have a variable defined in the main window (browser.xul overlay), you can get it from a sidebar by using the window manager to get a reference to the main window.
You can create your own XPCOM object, although this is not simple to do, specially for a simple case like yours
You can used JavaScript modules to create a global singleton.
You should consider looking into the JavaScript modules option. It's the easiest and most reliable way. It was introduced in Firefox 3.0 and you can do it using only JavaScript without having to create a XPCOM
Check here for more details:
https://developer.mozilla.org/en/JavaScript_code_modules/Using_JavaScript_code_modules
UPDATED:
Here are some more details about how to get a reference to the main window to see what variables defined in browser.xul.
You define the variable in the browser.xul overlay (main window):
myArray = [1, 2, 3];
Then from the sidebar xul, you can get a reference to the main window and access your variable using the reference:
var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebNavigation)
.QueryInterface(Components.interfaces.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIDOMWindow);
var value = mainWindow.myArray[0];
These links might have useful information for you:
https://developer.mozilla.org/en/Working_with_windows_in_chrome_code
https://developer.mozilla.org/en/Code_snippets/Tabbed_browser