Recently, a considerable research interest has grown up in the millimetre wave wireless system as the most promising technologies in the next generation communication. Since high-frequency channels of the millimetre wave are easily attenuated in space, beamforming technology relying on the massive multi-input-multi-output system is introduced to transmit the millimetre wave in a very narrow directional beam, so as to greatly improve the transmit efficiency. Then a challenging problem lies in that how to optimise the overall throughput by allocating the antenna resources to different mobile users in the massive MIMO antenna system. In this study, the authors handle such a difficult problem in two different cases. They first begin with the one-direction case, i.e. all sub-arrays are deployed in several parallel rows along the edge of a rectangle antenna array. They decompose the problem and solve it gradually. Then they generalise the authors' result to the two-dimensional case, where the sub-arrays can be deployed in orthogonal directions. They apply the similar scheme, decompose the problem and solve each sub-problem progressively. Both NP-hard problems are solved with time efficient approximation algorithms. Simulation results demonstrate the efficiency of the proposed algorithms in different cases.