The order-of-magnitude increase in the dimension of antenna arrays, which forms extra-large-scale massive multiple-input-multiple-output (MIMO) systems, enables substantial improvement in spectral efficiency, energy efficiency, and spatial resolution. However, practical challenges, such as excessive computational complexity and excess of baseband data to be transferred and processed, prohibit the use of centralized processing. A promising solution is to distribute baseband data from disjoint subsets of antennas into parallel processing procedures coordinated by a central processing unit. This solution is called subarray-based architecture. In this work, we extend the application of expectation propagation (EP) principle, which effectively balances performance and practical feasibility in conventional centralized MIMO detector design, to fit the subarray-based architecture. Analytical results confirm the convergence of the proposed iterative procedure and that the proposed detector asymptotically approximates Bayesian optimal performance under certain conditions. The proposed subarray-based EP detector is reduced to centralized EP detector when only one subarray exists. In addition, we propose additional strategies for further reducing the complexity and overhead of the information exchange between parallel subarrays and the central processing unit to facilitate the practical implementation of the proposed detector. Simulation results demonstrate that the proposed detector achieves numerical stability within few iterations and outperforms its counterparts.