We give a $C^1$-perturbation technique for ejecting an a priori given finite set of periodic points preserving a given finite set of homo/heteroclinic intersections from a chain recurrence class of a periodic point. The technique is first stated under a simpler setting called a Markov iterated function system, a two-dimensional iterated function system in which the compositions are chosen in a Markovian way. Then we apply the result to the setting of three-dimensional partially hyperbolic diffeomorphisms.