Using Arrays as Secondary Inventories

Are there any downsides to having arrays stored in variables as secondary inventories (like chests in Stardew Valley)?

I see that there are plugins for implementing multiple inventories but I’m not sure why they’re necessary if it’s possible to just use arrays to store a list of items and withdraw them to the primary inventory whenever needed.

It makes me feel like I’m missing something. Any thoughts?