Hello! I fear this answer comes too late or that I'll be 'necroing' the post (I'm really sorry if that's the case) but I've just found it and I was a little bit surprised that this got no solution posted yet or maybe because this has passed unnoticed.
The solution is actually very simple. You placed the method in the 'Item' class instead of placing it in the 'Inventory' class. The inventory is the container, so the logical thing is to place the Contains check in it.
More little things. (A little off-topic but I consider good to point out)
You can use Lists instead of Arrays, so you can use a good bunch of already implemented functions in C# as 'Contains':
public List<Item> Inventory; ... if(Inventory.Contains(myItem)) { ... }
You can override the Equals in the Item class too, if you consider it necessary.
Another little thing: I've noticed that you're trying to simulate properties (in this case, with getter but not setter) in the Item class.
Just to follow a better convention here on how to do things, I'd recommend you use properties with backing fields. Something like this:
[SerializeField] private string testField; public string TestField { get { return testField; } set { testField = value; } }
You can remove the setter part in your case, of course... and about naming conventions..., follow what you find more comfortable working with.
Now... beware of auto-properties, because Unity inspectors do not show those in the Editor with Monobehaviours and ScriptableObjects:
public string TestField { get; set; }
I know it's odd, but it's a Unity thing, I had a lot of frustration myself with this too.
And here some small reading on Lists and the Array vs Lists question
https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?vi...
https://www.gamasutra.com/blogs/RobertZubek/20150504/242572/C_memory_and_perform...
And some about exposing properties in inspectors
https://forum.unity.com/threads/exposing-properties-in-the-inspector.471363/
https://answers.unity.com/questions/14985/how-do-i-expose-class-properties-not-f...
Again, sorry in case of necroposting.
Anyway, hopefully this will help you a bit.