I want to know what exactly is the function of :_InvStorage() here and should I include all the slate attributes and arguments to it? Like here I have not included the SlotLoc but it still works fine.
SLATE_BEGIN_ARGS essentially defines a struct and its corresponding constructor, where SLATE_ATTRIBUTE and SLATE_ARGUMENT define member variables of that struct in the form _Name (along with a series of setter functions in the form Name(...), which is what you actually use from the outside).
What you’re seeing with :_InvStorage() is an entry in the constructor initialisation list for the FArguments type for your widget.
As with any constructor, anything you don’t specify here will be default constructed (assuming it’s possible to be default constructed).