agk just using a struct as a memoryblock with default values, so integer =0 float = 0.0 string link to ""
other way, using ix as content and fill the list only with filled data. its different, access by row/column is more common and works without search.
this will make a copy, if you not want maybe just memory the index here.
tileArray[ix].piece = player_pieces[drag_piece_id].piece
and btw agk support the ref (by reference) in function arguments
AGK (Steam) V2017.01.09 : Windows 10 Pro 64 Bit : AMD (16.12.1) Radeon R7 265 : Mac mini OS Sierra (10.12.2)