I knew I’d read some way of doing this but it took me ages to finally find it again. This should really be properly documented. Anyway, here you go.
UFUNCTION(BlueprintCallable, Category = Loadout)
static void SetLoadoutSlot(UPARAM(ref) FLoadoutStruct& Data, uint8 SlotIndex, const FLoadoutSlotStruct& Slot);