Electric tuning and switching of the resonant response of nanoparticle arrays with liquid crystals