To understand the Array component and its difference from the cookie, you need to know their storage nature.
The Array component, just as the Variable component - are kind of volatile storage- they are only available within the page life time.
Html5 Storage - Local, Session and Cookie Storage
While Local Storage, Sessions Storage and Cookie Storage - are persistent storage - they are available to all pages of your web site. All within the user browser, so client side. Exception is only Cookies that are also passed to server side.
Live time
So the Array just as the Variable live only within the current page. The advantage of the Array is that is a list of items - so you can much more easy manipulate the list than a simple variable.
Saving Arrays
But to store and preserve the Array (just like Variable) you need to assign it to one of the persistent storage. That can be Local Storage, Sessions Storage and Cookie Storage.
As Arrays can contain also more complex objects like records, it is better to store them in Local/Session Storage and not in Cookies - as those are simple strings.
So to store and also read an Array from a persistent storage like Session you will do:
<dmx-session-manager id="session1"></dmx-session-manager>
<dmx-array id="arr1" dmx-bind:items="session1.data.arr1" dmx-on:updated="session1.set('arr1',items,{})"></dmx-array>
This will auto populate the Array from the Session Storage and also when the Array is updated - it will save it back.
You could also save the array into a cookies, but then you need to serialize it your self:
<dmx-cookie-manager id="cookies1"></dmx-cookie-manager>
<dmx-array id="arr1" dmx-bind:items="cookies1.data.arr1.split('|')" dmx-on:updated="cookies1.set('arr1',items.join('|'),{})"></dmx-array>
More info
For more detailed in depth comporasson of the various HTML5 Storage possibilities read:
https://www.quora.com/What-is-the-difference-between-sessionstorage-localstorage-and-Cookies