Technically I keep an array of TArray<AItem*> items. The best thing about Actors is they pretty much self replicate. No need to do anything except put the replicates tag on the array, and Add the array to the DOREPLIFETIME macro. In the constructor of my AItem I simply set them to replicate.
Originally I thought the same thing about the Memory Footprint of an Actor but from everything I have read and seen Unreal Engine is capable of handling a LOT of Actors. I can tell you there is also a LOT more memory required for an AActor compared to a UObject or Struct. In my opinion it depends on what you “need” from your inventory system as these items all have their advantages and disadvantages. If you are just going to display information then use a Struct or UObject. If you are going to give a 3D visual representation of the item in the characters inventory then I suggest an Actor that way you don’t have to spawn the item and then destroy it constantly for display. If you want some higher level of interactivity between your player and inventory items (such as equipping gear or applying specific effects to the character) I suggest UObject or AActor over struct. Generally structs will have the smallest footprint followed by UObject followed by AActor. All 3 can replicate but AActor and Struct replicate the easiest.
One my my earliest implementations of an inventory system I used UObject as my Item Data when it was within my inventory and an ItemActor when it was in the world. The ItemActor contained the UItem object or the players inventory contained the UItem Object. When the player picked up the Item from the world only the UItem was given to the players inventory and the ItemActor was Destroyed. When the item was dropped from the players inventory the UItem spawned an ItemActor into the world and it was set to that ItemActor. This worked pretty well but it requires both the UItem and ItemActor to have a cross reference to each other’s types, which can be a bit cumbersome as a Designer must build both a UItem for Data and an ItemActor for world visual representation.
But as you can see there are MANY different ways to make an inventory system. I personally have never liked using structs because I’ve always had the requirement that each item does something completely different and needs some level of interaction between the owning player and it that can be defined as Item blueprints. So for me UObject or AActor have been my preferences.