Hoooowever a user once has found out that there seems to be a way of getting an id:
The 24th unit property doesn't exist, but it returns a number that seems to be unique for every unit (if one unit dies it's number will be recycled). However it returns multiples of 64, so: 0, 64, 128, 194, 256, etc.
It doesn't really work the other way round tho. But with an array that's no problem anymore.
PS: That should also work through GUI by using Get Unit Property (Int) and when you choose the property you select Value and enter 24 (or actually any number above that).