  The competing effect of a periodic pinning potential and random point
disorder is studied for arrays of elastic lines or directed polymers. The
groundstates are investigated by exact combinatorial optimization. In both two
and three dimensions a phase diagram is found with two or three distinct
phases: a strictly flat phase if the disorder is bounded and weak, a weakly
fluctuating phase for intermediate valleys depths, where the lines roughen
individually on a scale smaller than the line-line distance, and a rough phase
for strong disorder, where the roughness follows the scaling with pure point
disorder. The line wandering in the transverse direction leads in the
three-dimensional, rough phase to an entangled state with a complicated
topology.
