This is a pretty broad question, but those are my favorite. Let's give it a shot!
Your first set of products, Foods, Medicines, Toiletries, etc.
In the case of Food and Medicine, most of the constituent molecules are going to be organic. This is actually a boon in our case because with Carbon, Oxygen, Nitrogen, and Hydrogen, we can produce multitudinous products, including almost every food and plastic. So where do we get these four things?
- Hydrogen is the most common element in the universe. Depending on the tech level in your world, Hydrogen is also likely the fuel you will be using to generate power via nuclear fusion. Thus, Hydrogen will likely need to be stored in isolation and replenished frequently (perhaps via scooping around stars/gas giants?).
- Oxygen is also relatively common in the universe, since secondary stellar fusion tends to produce our favorite breathable gas. Oxygen is very reactive, so storing it by itself might be a problem (also molecular oxygen is not very dense, and stores inefficiently). I would suggest storing oxygen in the form of water stores. Your people will need water, and this will also provide supplementary Hydrogen supplies if needed.
- Carbon is not so common in the universe, but it isn't exactly rare, either. Carbon comes in more forms than I can count, and provides many storage options. I see three good possibilities for Carbon storage. Firstly, CO2 has carbon and oxygen both, so you'd get a twofer, but it takes a lot of energy to rend this molecule into its constituent components. Another option is hydrocarbons, which have a lot of carbon and hydrogen, and are pretty dense. Personally I'd go with the last option which would be Ethanol. It has Carbon, Hydrogen, and Oxygen all in one molecule, and you can drink it to get drunk! The only downside is it's relatively lightweight.
- Nitrogen is tricky. While abundant in the atmosphere, Nitrogen is pretty rare compared to the first three elements. Diatomic nitrogen is a gas, and hard to store, but liquid nitrogen is useful and more dense. Personally I'd go with a mix of Nitrates and Nitrites, which typically exist when bonded to cations like Potassium or Calcium, or other molecular ions, and thus could provide access to both Nitrogen and Oxygen, as well as the various inorganic things you find bonded to them. Some of the nitrated molecules might require separate storage in case of reaction, but the number of potential combinations is too vast to list here.
Simple Technical Components and Ammunition
Assuming your components are fairly simple, metals like Steel or Aluminum could suffice to construct them. Ammunition sometimes uses other metals, like lead, brass, or copper, but none of these are super difficult to acquire nor difficult to store. In fact, ALL metals are fairly simple to store in their pure form if they are isolated from other elements to prevent corrosion or reaction. The real issue is going to come from the propellants for your ammunition, but luckily most of these chemicals are going to be made from the four elements listed in the above section, so there shouldn't be a huge issue.
This is tricky. Modern electronics rely mostly on silicon and copper/gold for circuit construction, but I have no way of knowing from what sorts of exotic materials your future computers might be constructed. If they use superconductors or anything like that you'll have to figure out from what they are made and if any of those materials need special consideration. For more contemporary electronics, silicon can be stored in the form of silicates which are very abundant in rocks and sand, as well as synthetic gels, and copper/gold is simply another pure metal to store.
The stuff I listed above is all pretty common on Earth and fairly easy to keep in storage. If you want anything Transuranic, or any of the less common metals like Iridium or Palladium, you'll probably want to figure out how to synthesize them via nuclear fusion in a particle accelerator, since the pure metals are very rare. Energy requirements for such a synthesis are immense, but hey it's Science Fiction.
There are other things you might need that are less common but still necessary. An example might be Alkalis or Noble Gasses, or maybe some specific metals like Platinum or Mercury, etc. These things you might not need in great quantities but might need for some specific task. As a result, storage efficiency might be less of a priority and you can simply store them as pure elements, or in their most common molecular form.
If I were the chief engineer aboard this ship I would designate a permanent crew position dedicated entirely to making sure material storage is up to code. If, for example, a store of even a small amount of Potassium somehow interacted with the water stores, there would be a tremendously violent reaction and the ship would be damaged, crew killed, etc. Any nuclear stores also need special babysitting to ensure they don't accidentally go critical. Certain of these elements might also require specific temperatures and pressures to ensure safety or efficiency, though most of what I listed exists at STP just fine. My advice would be to invent all the things you might need aboard the ship, up to a comfortable level of specificity, and research what those things are made of and discover and special dangers associated with them.
Beyond that, I'm afraid, is above my payscale! Good luck!