Solution can be found on Unity forums, I'll quote for convenience.
Not directly, but you can use the InstanceID to rename the object, and then do a GameObject.Find using the InstanceID to access the object that way.
gameObject.name = GetInstanceID().ToString();
var foo = 38375; // A made-up InstanceId...in actual code you'd get this from a real object...you can store the instance ids in an array or something
GameObject.Find(foo.ToString()).transform.position = whatever;
I've also had a hashtable and used the instance ids as keys for the hashtable in order to access each object. You can go through and assign objects an identifier yourself, but since every object has a unique InstanceID() anyway, might as well use it if the situation calls for it.
Source: https://forum.unity3d.com/threads/can-i-use-instanceid-to-access-an-object.12817/
HashTableorDictionary.