Intermittent magnetic fields generated by turbulence in galaxies and galaxy clusters