Spatially periodic dynamos