One way I saw is to have a set of like 9 invisible slots that are not actually on the GUI that all the sides interact with. And when the block detects an item in there it automatically moves it to the proper spot, and if all spots are full then it usually 'unlinks' them. There are a few ways though.
I have been itching to created an ISidedInventoryEx that extends ISidedInventory with such functions though, unless someone else wants to do it first? Please?
The BC API for item handling is a good basis, just needs changes to become generic.