We demonstrate that an extended eddy-diffusivity mass-flux (EDMF) scheme can be used as a unified parameterization of subgrid-scale turbulence and convection across a range of dynamical regimes, from dry convective boundary layers, over shallow convection, to deep convection. Central to achieving this unified representation of subgrid-scale motions are entrainment and detrainment closures. We model entrainment and detrainment rates as a combination of turbulent and dynamical processes. Turbulent entrainment/detrainment is represented as downgradient diffusion between plumes and their environment. Dynamical entrainment/detrainment are proportional to a ratio of buoyancy difference and vertical velocity scale, partitioned based on buoyancy sorting approaches and modulated by a function of relative humidity difference in cloud layer to represent buoyancy loss owing to evaporation in mixing. We first evaluate the closures offline against entrainment and detrainment rates diagnosed from large-eddy simulations (LES) in which tracers are used to identify plumes, their turbulent environment, and mass and tracer exchanges between them. The LES are of canonical test cases of a dry convective boundary layer, shallow convection, and deep convection, thus spanning a broad range of regimes. We then compare the LES with the full EDMF scheme, including the new closures, in a single column model (SCM). The results show good agreement between the SCM and LES in quantities that are key for climate models, including thermodynamic profiles, cloud liquid water profiles, and profiles of higher moments of turbulent statistics. The SCM also captures well the diurnal cycle of convection and the onset of precipitation.