Casting a Array in Cpp

I create in one class a array like:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = InventoryTest)
TArray<UObject*> exampleArray; //(UObject to get the reference an instanced object of type “Object” in variable type like in BP )

And know I want cast the previous array to add him a item in another class

some code for when I pick up something
(array?) .Add(Item);

Casting array? Don’t do that. More code and context needed. Array of pointers to **UObject **in 99% isn’t good choice.