The programmable array microscope (PAM) uses a spatial light modulator(SLM) to generate an arbitrary pattern of conjugate illumination and detection elements. The SLM dissects the fluorescent light imaged by the objective into a focal conjugate image, Ic, formed by the 'in-focus' light, and a nonconjugate image, Inc, formed by the 'out-of-focus' light. We discuss two different schemes for confocal imaging using the PAM. In the first, a grid of points is shifted to scan the complete image. The second, faster approach, uses a short tiled pseudorandom sequence of two-dimensional patterns. In the first case, Ic is analogous to a confocal image and Inc to a conventional image minus Ic. In the second case Ic and Inc are the sum and the difference, respectively, of a conventional and a confocal image. The pseudorandom sequence approach requires post-processing to retrieve the confocal part, but generates significantly higher signal levels for an equivalent integration time.