Hey there,
I do the same thing to make sure people don't die in prison. I'd lost 2 dwarves to dehydration because my fort was very busy and had no children.
I find that in order to get proper behavior out of item-specific food stockpiles, there can't be any generic food stockpiles on the map. I create the following types and I got it all to work finally:
A food stockpile which forbids Seeds and Drinks.
A food stockpile which allows only Drinks.
A food stockpile which allows only Seeds, and has zero "barrels allowed"
Optionally, a food stockpile which allows only Prepared Meals and no barrels, in a low-traffic area, to store huge roasts.
If you don't do this, dwarves will place 8-10 seeds, in a bag, in each barrel, quickly using up your supply. They also do strange things with these barrels, as the code doesn't seem to look deep enough to know what's in the barrel, due to the bag, and the dwarves will place this seed barrel wherever they want, including furniture stockpiles.
Once I segregated the "main" food stockpiles in this way, the dwarves placed ALL seeds of a particular type into a single bag in a single stockpile space, reducing our seed storage needs to about 10 tiles tops. Food and drink also seemed better-organized and I was then able to use 'take from pile' in the prison food\drink stockpile to specifically take food and drink from the appropriate piles, fixing all the problems you describe.
I use a long stockpile (1x8) on each side of the 1x8 row of chains, one holding food and one holding drink. Segregating seeds has made it all work properly, the dwarves keep all 8 tiles filled with fresh food and drink. It's like a prison buffet!