An index is a number used to enumerate things. By nature this has to be a progressive integer.
An array also uses integers.
Something like '3,1' is not a number to Construct, so it interprets it as a string.
For you to not lose overview, use the array 'database' as a simple 1-dimensional array to store the names of the objects:
stick stone apple colorblock1 colorblock2 stoneblock
Now you may reference the object by its index (stick = 1, stone =2, ..., stoneblock = 6)
When filling the inventory, put in this index, e.g. if the second slot of the inventory should contain an apple, then inventory(2) = 3
To look up the name, you use database(inventory(2)), which resolves into database(3), which is "apple", because the third item of database is "apple"