Phase-field modeling has proven to be a versatile tool for simulating microstructural evolution phenomena, such as grain growth in polycrystalline materials. However, the computing time and computing memory requirements of a phase-field model pose severe limitations on the number of phase-field variables that can be taken into account in a practical implementation. In this paper, a sparse bounding box algorithm is proposed that allows the use of a large number of phase-field variables without excessive memory usage or computational requirements. The algorithm is applied to a three-dimensional model for grain growth in the presence of second-phase particles.