Cycles for rational maps of good reduction outside a prescribed set