If i understand you issue correctly, you have multiple editable hotspots created from an array parameter and you wish to identify what number of the loop you are selecting.
For this I'd suggest using the custom description feature as follows...
hotspot2 x, y, unID, parameter
, type, displayparameter, "custom description" : unID=unID+1
You could replace custom description with your 'unID' value or your 'i' value, but whatever you put there it must be a string (you have to convert 'unID' and 'i')
the display parameter can just be the same as parameter, but it neesd to be present to set the "custom description"
Happy Hunting
AC 24 5004 AUS
iMac OSX (10.13.6) 4.2ghz i7
8gb ram/8gb vram