I think the point was that if you use structs, you can’t store them as pointers (for replication), so it’s not possible to have an array containing different subtypes.
You can just store identifiers for the item type, rather than instantiated items. If you need to have them instantiated with their own subtype-specific data, then what is wrong with having them spawned in the world? A few hidden, non-ticking actors is hardly going to be a performance problem, assuming inventory contents isn’t changing super fast.