Hybrid beamforming (HBF) array structure has been extensively demonstrated as the practically-feasible architecture for massive MIMO. From the perspectives of spectral efficiency (SE), energy efficiency (EE), cost and hardware complexity, HBF strikes a balanced performance tradeoff when compared to the fully-analog and the fully-digital implementations. Using the HBF architecture, it is possible to realize three different subarray structures, specifically the fully-connected, the sub-connected and the overlapped subarray structures. This paper presents a novel generalized framework for the design and performance analysis of the HBF architecture. A parameter, known as the subarray spacing, is introduced such that varying its value leads to the different subarray configurations and the consequent changes in system performance. Using a realistic power consumption model, we investigate the performance of the generalized HBF array structure in a cellular infrastructure-toeverything (C-I2X) application scenario (involving pedestrian and vehicular users) using the single-path terahertz (THz) channel model. Simulation results are provided for the comparative performance analysis of the different subarray structures. The results show that the overlapped subarray implementation maintains a balanced tradeoff in terms of SE, EE and hardware cost when compared to the popular fully-connected and the sub-connected structures. The overlapped subarray structure, therefore, offers promising potentials for the beyond-5G networks employing THz massive MIMO to deliver ultra-high data rates whilst maintaining a balance in the EE of the network.