The chemical reactions and pathways involving organophosphates, any phosphate-containing organic compound.