The whole range of biochemical processes that occur within a living organism. An example is self feeders like algae and green plants use the energy of sunlight to assemble inorganic precursors, chiefly carbon dioxide and water, into the array of organic macromolecules of which they are made. This process is photosynthesis.