Without providing any code then the theory is this.
In the object that you want the inventory to be in (Player object for example) create an array then add the GameObject references to the items you pick up to it.
Acting upon them is up to you but you could name the pickupable objects with a tag and then find them within the array using the tag name.