Effect of resonant magnetic perturbations on three dimensional equilibria in the Madison Symmetric Torus reversed-field pinch