We present a Brownian dynamics simulation study on the confinement and partitioning of a single, flexible polymer chain in a dense array of nanoposts with different sizes and separations, especially, when the volume of an interstitial space formed among four nanoposts is less than the volume of the polymer chain. As the interstitial volume decreases by either increasing the nanopost diameter or decreasing the separation between nanoposts, the chain conformation becomes elongated in the direction parallel to the nanoposts. Interestingly, however, the degree of chain elongation varies in a non-monotonic fashion as the interstitial volume decreases while keeping the passage width between two nanoposts constant at a small value. We calculate the free energy of chain partitioning over several interstitial spaces from the partitioning probability, and find that the non-monotonic dependence of the chain elongation results from an interplay between the confinement-driven chain elongation along the direction parallel to the nanoposts and the chain spreading perpendicular to the nanoposts by partitioning chain segments over several interstitial spaces. These results present the possibility of utilizing a dense array of nanoposts as a template to control polymer conformations.