1) make it so the last step in crafting (armor, weapons, food) is townies at least TRYING to place the item in a container, perhaps search about 10 or 15 steps away for a container/stockpile. This will reward proper placement and carefull setup of stockpiles and containers.
Townie1: make item.
Townie1: leave on floor.
Townie2: (coming from the other end of the map, perhaps several minutes later) pickup item.
Townie2: deposit in container 2 tiles away.
2) Make it so stockpiles have a higher priority to remove from. containers already have a higher priority when storing items.
Townie 1: (hungry) Remove bread from barrel.
Townie 2: (perhaps several minutes later) pickup bread from stockpile
Townie 2: Deposit bread in barrel.
This happens every time an item is taken from a container and there are stockpiles of the same type.