Thin-film diode structures for advanced energy applications