i think you don't need an array, I thought you have shapes like a circle, dragon or whatever, but if they are all rectangular, then its easy.

When you click mouse_left then you need which panels are visible.
Getting the panel's position is easy, then you need its x size and y size.
With these values you can compare the mouse position to the panel's position and whether it is within the range of its x and y size.