Onions - can be blanched and frozen in diced or sliced form, not the greatest but they will do when defrosted. Fresh can be stored for several weeks in a cool dark place with lots of ventilation (low humidity).
Bay Leaves are likely already dried and will keep in whole form for 3-6 months easily. If you need fresh you could probably freeze them just fine, the flavor is in the oils so it won't go anywhere.
Thyme - grow a plant at home if you like fresh as you don't usually use much per recipe, unless you like lots of Jerk'd food. The dried stuff is just fine so stock up on it. Again the flavor is in the oils.
Garlic will last for several weeks in a cool dark place if you buy fresh bulbs - lots of grocery store stuff is already over a year old and way past it's prime. Alternately buy a small jar of the diced stuff in the refrigerated section of the market - check the ingredients label - they cheap stuff will have likely too much 'stuff' in it, this will keep in the fridge for at least a few weeks and is often better than the sprouting bulbs at the mega-mart.
Juniper berries are usually dried when called for in a recipe and they keep well for 3-6 months so stock up. If you need fresh then you are best to keep them frozen and thaw as needed. Although i've never seen frozen juniper berries for sale tbh.
The key to preventing degradation when freezing/thawing is twofold:
a) freeze the items as fast as you can, and
b) thaw them slowly in the refrigerator.
Hope that helps