Loopindex expression only works with System loops. When using Array For Each Element loop, you need Array.CurValue, Array.CurX and Array.CurY expressions.
Also, if your array is 2D, then you probably need to store item name and item quantity in separate cells. Your current code tries to write them into one cell as a string:
"Axe,2"
Stop Loop action also won't work with this loop. You will need another way to stop it, for example reset the item quantity.
So the correct code should look like this:
For Each X element
Array.CurValue="Nothing"
Item.quantity>0
: Array set at (Self.CurX, 0) to Item.name
: Array set at (Self.CurX, 1) to Item.quantity
: Item set quantity to 0
: Item destroy