To do an inventory system like this- you'd want to use an array to hold the names(keys) of the items- you'd want to use hash tables to actually hold the data (textures, bools, game objects etc)
Hash tables hold a key(name) and a value (variable)- you store different things in different hash tables like one for textures for your ui, one with game objects, one for bools etc
You access the data by using the key- its a little difficult to understand at first but very simple once you get it-
Arraymaker calls them "hash tables" but if you want to learn more via google they are called "Dictionaries" most of the time in game dev