Working with arrays in Construct is not fun, it's a lot easier to manipulate instance variables, and then copy them into the array.
So I would toggle the icons like this:
And when the inventory is closed - copy them back into the array. For example:
For each Icon ordered by Icon.ID
.. Array set value:Icon.isActive at X:loopindex
You can create a helper function WriteToArray and call it every time any icon in the inventory is changed - toggled state, dragged and dropped, re-sorted etc.