RNA is a linear polymer of nucleotides linked by a ribose-phosphate backbone. Polymerization of nucleotides occurs in a condensation reaction in which phosphodiester bonds are formed. However, in the absence of enzymes and metabolism there has been no obvious way for RNA-like molecules to be produced and then encapsulated in cellular compartments. We investigated 5'-adenosine monophosphate (AMP) and 5'-uridine monophosphate (UMP) molecules confined in multi-lamellar phospholipid bilayers, nanoscopic films, ammonium chloride salt crystals and Montmorillonite clay, previously proposed to promote polymerization. X-ray diffraction was used to determine whether such conditions imposed a degree of order on the nucleotides. Two nucleotide signals were observed in all matrices, one corresponding to a nearest neighbour distance of 4.6 Å attributed to nucleotides that form a disordered, glassy structure. A second, smaller distance of 3.4 Å agrees well with the distance between stacked base pairs in the RNA backbone, and was assigned to the formation of pre-polymers, i.e., the organization of nucleotides into stacks of about 10 monomers. Such ordering can provide conditions that promote the nonenzymatic polymerization of RNA strands under prebiotic conditions. Experiments were modeled by Monte-Carlo simulations, which provide details of the molecular structure of these pre-polymers.