Preventing Items from shifting in a list

I’m using a list for the inventory, and when the player drops an item (Inventory.remove(index)) all of the items in the inventory shift up a spot to fill in the empty space. My question is:

Is there a way to stop this from happenning?

Should I be using an array?

If I use an array how would I add an item to the inventory (Equivalent to list.add)?

Does anyone have any suggestions?

Thanks

You could set each element to be a class (if not already); in each list add a Boolean called canbeseen. if a player or any other script tries to view the list or modify it just set it so that it won’t be shown unless canbeseen. When you try to place something in that spot, just overrideit. Hope this helps!