It would be very useful and probably simple enough to do, to add the same mechanic as "favorite" items to any container. This function would "bind" the item or item stack to the container, so you can't take them out until you "unfavorite" them (but you can still use them if you're in reach)
What would be the purpose? For example i always leave some basic items on the trunk or glovebox of the cars (bandages, food, cigarettes, etc) and it would be great to keep them there as i always end up taking them out accidentally when i'm taking all the loot from the container.