I tried using Strings like you said and it didnt seem to make things better
for example I set the first value of the array to sword to test things out and gave 2 other names to the 2nd and 3rd slot. Then instead of frames I switched to animations, so the game will fetch the strings from the array and play the animation with the same name as the value, if value is 0 it will be "empty"
so I used debug and I noticed that the itemName values didnt get anything inside, at least it didnt cause a mess with bags 2 and 3 this time. I do not understand what I did wrong, also yes I did give each slot an individual ID in the editor, and depending on the bag they will have a "second ID" that matches the bag number (bag 1 is items to 8, bag 2 is items 9 to 15 etc)
I should mention at the start of layout I clear the array to 0 and set the values like this: Set Value at 0 "sword"