I also thought of this, multiple times, but wasn't sure how to do it. Hret, we can assign extra data to items, perhaps assign this to items in a lot with this flag, then when a player leaves, iterate through their inventory, and place the items back? The extra data may include the type of block the item was taken from, as well as its location.
That seems like it could work.