So when you drop an item into an inventory you'd only need to see if the 1 places were unoccupied as well as inside the array. If all the 1 were then you could then place the object in the inventory.
Here is an example without arrays, although you could certainly use arrays instead. I'm just using "is overlapping point" instead of an array lookup. It handles placing and removing items, as well as throwing them out if they are placed in an invalid spot. Perhaps some of the ideas here are useful.
https://www.dropbox.com/s/tpwx74fq1c43auc/Fit_shapes_into_slots.capx?dl=1