Collection could be indexed with any \Stringable value (currently only string|int), for example Ramsey\Uuid.
For Doctrine Collections package it aplys to get, set, remove, containsKey methods.
In Doctrine ORM it is related to bellow relation, but it will probably work just with change signature of above methods.
<one-to-many field="someCollection"
target-entity="SomeEntity"
mapped-by="parent"
index-by="uuidField" />