Patterned Perovskites for Optoelectronic Applications