RE: How do plants create minerals?
Soil has all the elements that you're talking about. New soil has large particles (sand) with a small surface area for nutrient absorption. Of course the parent material (rock) that the soil came from will determine the level of soil fertility, and pH of the soil. As the soil ages weather breaks the larger particles into smaller and smaller pieces (clay). This releases nutrients and increases surface area for absorption. Add some organic material (humus) to the mix and you end up with a fertile soil. Note: Nitrogen compounds are not normally found in rocks. Nitrogen compounds are formed from lighting and legume plants.
Age of soil (leaching) and crop removal will remove nutrients from the soil. When this happens you can replentish the nutrients by adding fertilizer, organic matter or planting crops and green manuring them.
Get a soil test and you'll know what you're starting with.
Dan O.