Can we create unique constraints on array field?

Hi Team,
my data model is something like

{
  id: <uuid> // currently this is primary key or unique key
 otherIds: 
  [ 
   { type: "abc", value: "<longNumber>"},
   { type: "abc2", value: "<longNumber>"} 
  { type: "abc3", value: "<longNumber>"} 
  ]
}

Now I have id which is primary key
I want Mongo to reject the calls if otherIds have got same ids
Is it possible to put unique constrainst on array nested models ?? Is it performant ??
Other Solution I am thinking is to derive id from these otherIds and id is already primary key so Mongo would reject it
What are recommended ways by Mongo Team to derive id from array of nested structures ??
Thanks,
Gheri.

Hey Team,
Any feedback ??