Consider a commutative local ring R, say a valuation domain, with maximal ideal M. Consider the fiber product $R \times_M R$ (I wrote M instead of R/M), coming from the pullback in commutative rings $R\rightarrow R/M$. Then the corresponding prime spectra of this fibered product (in rings) is actually a form of gluing of the same same (affine) scheme Spec R along the closed point M. So this is the case where this happens.
So I think you can do such things for affine Schemes. For affine schemes, you can at least reverse the topology (they are sometimes called inverse spectrum) and you can form a sheaf over this topology similar to the canonical structure sheaf, but the closed points becomes the generic points in this topology. I cannot recall correctly, but I think the stalks of this sheaves become integral domains (so it is some form of dual to the affine schemes, local becomes integral and so on)