First of all... context!
For you it might sound simple "why is this?" "how comes that?" etc, but in fact, you have no idea about how broad things can be.
There is an exception when you ask for a reason or ideas, but thats not the case.
So always explain your situation to get the right answer faster
To actually answer the question: thats impossible.
An array is a list of objects or values.
In the second case, a value can never keep track of all the arrays in existance to know if an array gontains a value with the same data.
In the case of objects, you are not so lucky either.
Even though the data might be the same, the objects could be different.
And even then, you could have an integer for every array to say in which index your object is, but if your object is found multiple times in the same array, this will fail.
So youll need an array for each array for each object. I hear design flaws... or crying performance, you may choose