I'm not sure if this helps, but here it goes.
You could put export var onto a script, and then re-use it on other nodes. Each node with that script can have that variable be changed only for them as well. To ensure that the code only works on the node you want triggered while using the code every other node does, add this to the beginning:
var button_name = self.name
I did this for my zombies so they could each use the same script. When only one of them collides with the player with their area2D, this check is made to ensure only that specified one performs the attack action:
if body.name == "Player" && zombie_name == self.name: