How to use mouseClicked to only effect one object in ArrayList?

Your Lego class should have a boolean field that sets the state as “currently-being-dragged” so each Lego instance has this field and tehnically only one lego would have this state set to true. I did a demo here recently. Maybe you can sere the approach there and applied it to your use case.

Btw, the code you provide is not enough to see the problem. I suggest you provide a MCVE as it will help a ton in these cases.

Kf