You could keep lists of the Buttons in that Arrangement, and use the IS IN LIST test block in your ANY BUTTON CLICK event.
Sample project: