I don’t think what you want to do is possible to do in blueprints alone, as far as I know all function outputs are by copy (except for objects), so your GetInventory function returns a copy of the array
I suppose you could instead use a macro (which is just a glorified subgraph) instead, and it should work
Also, you can use the Set Members In Struct function to set values directly to a struct reference (which you can get using the Get(a ref) node from the Array returned by the macro