This paper studies hybrid beamforming for active sensing applications, such as millimeter-wave or ultrasound imaging. Hybrid beamforming can substantially lower the cost and power consumption of fully digital sensor arrays by reducing the number of active front ends. Sparse arrays can be used to further reduce hardware costs. We consider phased arrays and employ linear beamforming with possibly sparse array configurations at both the transmitter and receiver. The quality of the acquired images is improved by adding together several component images corresponding to different transmissions and receptions. In order to limit the acquisition time of an image, we formulate an optimization problem for minimizing the number of component images subject to achieving a desired point spread function. Since this problem is not convex, we propose algorithms for finding approximate solutions in the fully digital beamforming case, as well as in the more challenging hybrid and analog beamforming cases that employ quantized phase shifters. We also determine upper bounds on the number of component images needed for achieving the fully digital solution using fully analog and hybrid architectures, and derive closed-form expressions for the beamforming weights in these cases. Simulations demonstrate that a hybrid sparse array with very few elements, and even fewer front ends, can achieve the resolution of a fully digital uniform array at the expense of a longer image acquisition time.