Metal, metal oxide, and carbon-based nanocomposites