  Rotating neutron stars (NSs) are promising sources of gravitational waves
(GWs) in the frequency band of ground-based detectors. They are expected to
emit quasi-monochromatic, long-duration GW signals, called continuous waves
(CWs), due to their deviations from spherical symmetry. The degree of such
deformations, and hence the information about the internal structure of a NS,
is encoded in a dimensionless parameter $\varepsilon$ called ellipticity.
Searches for CW signals from isolated Galactic NSs have shown to be sensitive
to ellipticities as low as $\varepsilon \sim \mathcal{O}(10^{-9})$. These
searches are optimal for detecting and characterising GWs from individual NSs,
but they are not designed to measure the properties of NSs as population, such
as the average ellipticity $\varepsilon_{\mathrm{av}}$. These ensemble
properties can be determined by the measurement of the stochastic
gravitational-wave background (SGWB) arising from the superposition of GW
signals from individually-undetectable NSs. In this work, we perform a
cross-correlation search for such a SGWB using the data from the first three
observation runs of Advanced LIGO and Virgo. Finding no evidence for a SGWB
signal, we set upper limits on the dimensionless energy density parameter
$\Omega_{\mathrm{gw}}(f)$. Using these results, we also constrain the average
ellipticity of Galactic NSs and five NS ``hotspots'', as a function of the
number of NSs emitting GWs within the frequency band of the search
$N_{\mathrm{band}}$. We find $\varepsilon_{\mathrm{av}} \lesssim 1.8 \times
10^{-8}$, with $N_{\mathrm{band}}=1.6 \times 10^7$, for Galactic NSs, and
$\varepsilon_{\mathrm{av}} \lesssim [3.5-11.8]\times 10^{-7}$, with
$N_{\mathrm{band}}=1.6 \times 10^{10}$, for NS hotspots.
