Vortices in inhomogeneous superconductors with periodically modulated structure