Added function to update array to the coordinates specified by the button's title