We propose an algorithm that given as input a full word w of length n, and positive integers p and d, outputs (if any exists) a maximal p-periodic partial word contained in w with the property that no two holes are within distance d. Our algorithm runs in O(nd) time and is used for the study of freeness of partial words. Furthermore, we construct an infinite word over a five-letter alphabet that is overlapfree even after the insertion of an arbitrary number of holes, answering affirmatively a conjecture from Blanchet-Sadri, Merca¸s, and Scott.