Photoreduction and oxidation of amorphous indium oxide