What I'm trying to is make a script that adds a container's entire inventory to the player, then later it returns *only* what was added by the container back to said container, removing it from the player. My initial idea was to make an array containing a list of items that were in the container originally, along with counts for each item, but I seem to be having trouble.
1) Is it possible to create an array without a fixed length? All of the examples on the wiki show the script initializing the array with a defined length.
2) Is it possible to access an inventory as an array directly? This would be the most perfect approach, by far, but from what I can tell there's no function that returns and array like that in ObjectReference.