We investigate synchronization caused by long-range hydrodynamic interaction in a two-dimensional, substrated array of rotors with random intrinsic frequencies. The rotor mimics a flagellated bacterium that is attached to the substrate ("bacterial carpet") and exerts an active force on the fluid. Transition from coherent to incoherent regimes is studied numerically, and the results are compared to a mean-field theory. We show that quite a narrow distribution of the intrinsic frequency is required to achieve collective motion in realistic cases. The transition is gradual, and the critical behavior is qualitatively different from that of the conventional globally coupled oscillators. The model not only serves as a novel example of non-locally coupled oscillators, but also provides insights into the role of intrinsic heterogeneities in living and artificial microfluidic actuators.