I would definitely use arrays, it's so easy. An array is just a list of items and you can see what's going on very easily with what you've collected. You can use simple conditions like when you pick up an item, check if the array contains the item, and add 1 or stack it.
In my opinion it's more difficult to make an inventory without an array and if you are new with the software you will likely come across bugs that you don't know how to fix. Checking if a certain item is overlapping another item to be able to pick it up etc. This can all be avoided with a simple array.
Array items are rows, X=0, X=1, X=2. Pick up an item, check if array contains item, if not then push to the back of array. Second column could be amount collected so you can stack. Easily display the array items in your game : give the inventory slots instance variable IDs that relate to the array rows - for each slot set slot.item to array.at(slot.ID).