How are you structuring your inventory data wise?
Make it easier on yourself by grouping. Then show all would be as easy as looping each group and packing the results. Flush the result to UI functions for display.