Pinning and wicking of a liquid meniscus in a square array of pillars is investigated in numerical energy minimizations and compared to wetting experiments. Our combined study shows that criteria for spontaneous film formation, based on thermodynamic considerations as well as on simple geometric modelling of the meniscus shape, are insufficient to predict the onset of wicking. High aspect ratio pillars with a square cross-section may display a re-entrant pinning regime as the density of the pillars is increased, a behaviour that is captured by neither of the aforementioned models. Numerically computed energy landscapes for the advancing meniscus allow us to explain the re-entrant behaviour in terms of energy barriers between topologically different meniscus shapes. Our numerical results are validated by wicking experiments where for the material contact angle θ0 = 47° the re-entrant behaviour is present for square pillars and absent for pillars with circular cross section.