You need to pick the correct ItemIcon instance, corresponding to the array element. Without picking, the animation will change for all ItemIcon instances.
When ItemIcon sprites are created, give them two instance variables - invX and invY.
Set invX to ItemPosition.CurX
Set invY to ItemPosition.CurY
Then, when an item is picked up and you found an empty slot, you can pick ItemIcon instance by invX and invY.
Also, if I undertand correctly, your inventory array has 4 rows and 8 columns. So you need to use "For each XY element" loop. (not "For each X")