An array of spin torque oscillators (STOs) for practical applications such as pattern recognition was recently proposed, where several STOs are connected by a common nonmagnet. In this structure, in addition to the electric and/or magnetic interactions proposed in previous works, the STOs are spontaneously coupled to each other through the nonmagnetic connector, due to the injection of spin current. Solving the Landau-Lifshitz-Gilbert equation numerically for such system consisting of three STOs driven by the spin Hall effect, it is found that both in-phase and antiphase synchronization of the STOs can be achieved by adjusting the current density and appropriate distance between the oscillators.