Thin silicon and metal-assisted chemical etching for photovoltaic and electronic devices