I find that the easiest way to put things back is to group them together on the kitchen table or a counter first and then I assess the items and put them back. I’ve even been known to label shelves with sticky notes so I can see where things will go and if it makes sense before I put them back.