Confocal imaging with bilateral scanning and array detectors