The new constraint can be applied to any property of type array or
\Traversable and the comparison is strict, so different types are considered
different elements (e.g. '7' (string) is different than 7 (integer)).

Symfony already provides some validators related to collections and uniqueness,
so keep in mind that:

Collection: applies different validation constraints for each collection
element.

Unique: validates that all the elements of a collection are unique.

UniqueEntity: validates that the given property value is unique among all
entities of the same type (e.g. the registration email is unique for all the
application users).