We study a universe filled with dust-like matter in the form of discrete inhomogeneities (e.g., galaxies and their groups and clusters) and two sets of perfect fluids with linear and nonlinear equations of state, respectively. The background spacetime geometry is defined by the FLRW metric. In the weak gravitational field limit, we develop the first-order scalar and vector cosmological perturbation theory. Our approach works at all cosmological scales (i.e. sub-horizon and super-horizon ones) and incorporates linear and nonlinear effects with respect to energy density fluctuations. We demonstrate that the scalar perturbation (i.e. the gravitational potential) as well as the vector perturbation can be split into individual contributions from each matter source. Each of these contributions satisfies its own equation. The velocity-independent parts of the individual gravitational potentials are characterized by a finite time-dependent Yukawa interaction range being the same for each individual contribution. We also obtain the exact form of the gravitational potential and vector perturbation related to the discrete matter sources. The self-consistency of our approach is thoroughly checked. The derived equations can form the theoretical basis for numerical simulations for a wide class of cosmological models.