I just keep on clearcutting forests, either above or below ground, and keep on churning out barrels at carpenter workshops until I have around 2,000 barrels. At that point I have enough barrels.
I seperate out stockpiles for crops I grow and things I do not grow. Also drinks and seeds get their own stockpiles.
For crops like plump helmets I make a small stockpile, perhaps only 30 tiles total, that stores only plump helmets and nothing else. No other stockpiles stores plump helmets. This will use 30 barrels at maximum and all extra plump helmets simply rot in the fields. But its okay, I will never, ever run out of food. It also prevents a single crop from consuming all of my barrels. I do the same thing with the other crops I farm.
Then I make many large stockpiles that stores imported plants or plants gathered from herbalism, meat, fat, prepared meals, etc. Everything but plump helmets, seeds, and drinks.
(Drink stockpiles are scattered around the fortress so there is always booze close at hand. Seeds are stored near the farm.)
The general purpose food stockpiles also double as barrel stockpiles, so there is always a barrel close at hand, which means that there are always plenty of barrels to put food into. Don't be shy about making more barrels. Making this many barrels and also bins gets you a few legendary carpenters. Wood is an infinitely renewable resource, and wood also pisses off the elves. I see no downside to using wood for bins or barrels.