This would be an extra function for the existing special containers like spice racks and alchemistry kits, and also any new (possibly player-creatable?) specialised bags and so on. What I envisage is the container has an extra command, something like "gather" that would pull every stack of the type of thing it holds from elsewhere in your inventory into itself, until it was full.
So, you wouldn't have to hunt through your bags after (say) a big spice run to find all the stacks of allspice plus the random ginger drops and the wee stacks of camphor you picked up off the ground or whatever to put them into your spice rack - you can just get the container to pull them all in. SDBs kind of do something like this, except it's only for the one kind of item that you choose to put in there, and you can't carry it around with you.
Make sense?
(and yes, if you already have a container in inventory, stuff automatically goes in there. But this might help those of us who are not that organised :P )