Switch and template pattern formation in a discrete reaction-diffusion system inspired by the Drosophila eye