It has recently been established that the high-transition-temperature (high-Tc) superconducting state coexists with short-range charge-density-wave order and quenched disorder arising from dopants and strain. This complex, multiscale phase separation invites the development of theories of high-temperature superconductivity that include complexity. The nature of the spatial interplay between charge and dopant order that provides a basis for nanoscale phase separation remains a key open question, because experiments have yet to probe the unknown spatial distribution at both the nanoscale and mesoscale (between atomic and macroscopic scale). Here we report micro X-ray diffraction imaging of the spatial distribution of both short-range charge-density-wave 'puddles' (domains with only a few wavelengths) and quenched disorder in HgBa2CuO4 + y, the single-layer cuprate with the highest Tc, 95 kelvin (refs 26-28). We found that the charge-density-wave puddles, like the steam bubbles in boiling water, have a fat-tailed size distribution that is typical of self-organization near a critical point. However, the quenched disorder, which arises from oxygen interstitials, has a distribution that is contrary to the usually assumed random, uncorrelated distribution. The interstitial-oxygen-rich domains are spatially anticorrelated with the charge-density-wave domains, because higher doping does not favour the stripy charge-density-wave puddles, leading to a complex emergent geometry of the spatial landscape for superconductivity.