A generalization of the t-J model in a system of two coupled chains or planes is studied by numerical diagonalization of small clusters. In particular, the effect of density fluctuations between these one- or two-dimensional coupled layers on intralayer phase separation and pairing is analyzed. The most robust signals of superconductivity are found at quarter filling for couplings just before the fully interlayer phase separated regime. The possibility of an enhancement of the intralayer superconducting pairing correlations by the interlayer couplings is investigated.