Is there a way to implent code to all instances of the same object?

I have an object in the library, let’s call it CoinObject.
now, I want to add manually, many instances of this object on the stage.

I want each instance to hold the same code, is there a way to add code to each instance without giving EACH AND EVERY ONE of the object an instance name and WITHOUT pasting the code ten of times in each object?

What I’m basically asking is, if there’s a way to add code to “ALL INSTANCES OF COINOBJECT ON THE STAGE” in one phase?

if there isn’t, is there a way to test if the character is touching an instance of an object?
(again, without name tens of objects?)