so do i need to make the array by hand or make some system that automatically makes the array?
for example, you can have an array of objects where each object looks like { coordinates: (0, 4), tile_id: 2 }. whenever a change happens on the board, you can create a new entry (a new array) and capture all the active objects on the board. if you ever undo, you need to grab the previous array of active objects and be able to interpret it and update the board.