An array has got nothing to do with the size of a background, so I'm lost at what you mean..,
To make an inventory first you'd have to have that information somewhere..
An array is one way, another could be the dictionary object or using global variables.
It all depends on your personal needs..
Your capx is kind of not usefull at all for it only shows a black square, has no reference to any inventory items and no direct lead on how you would like to display those items..