> But DNA must have evolved out of random structures and random mutations
Before DNA there was only RNA. DNA came later but established itself because it is much better at conserving information. There are still retro vira carrying their genetic information in the form of RNA reminiscent of that RNA era.
So the course of evolution might have been like this: 1) random RNA coils slowly gained structures being able to catalyze reactions e.g. like replicating itself. 2) Replicators become catalysts for other reactions. 3) Specialized RNA molecules start entangling themselves like e.g. one of them replicating the others while another provides access to chemistry providing energy (aka "food"). 4) RNAs start encoding proteins and enzymes adding to the entanglements. 5) Membranes appear isolating the entanglements from the environment inventing cells. 6) DNAs are created from RNAs forming the modern biochemical tri-unity of DNA, RNA and proteins.
Current origin-of-life theories are pretty diverse, but a very promising approach postulates the ribosome, the protein synthesis machine composed of proteins and RNA, as the original self-replicating entity. This model supposes the abiotic synthesis of both simple amino acids and nucleosides, the building blocks of proteins and nucleic acids, and some kind of random polymerization process.
If such random polymers were able to assemble into something like the ribosome, that structure could plausibly start replicating itself using the abiotic pool of free amino acids and nucleosides. This is somewhat different from older 'RNA world' theories in that it involves both amino acids and nucleosides. Abiotic synthesis of these precursors is fairly plausible.
Before DNA there was only RNA. DNA came later but established itself because it is much better at conserving information. There are still retro vira carrying their genetic information in the form of RNA reminiscent of that RNA era.
So the course of evolution might have been like this: 1) random RNA coils slowly gained structures being able to catalyze reactions e.g. like replicating itself. 2) Replicators become catalysts for other reactions. 3) Specialized RNA molecules start entangling themselves like e.g. one of them replicating the others while another provides access to chemistry providing energy (aka "food"). 4) RNAs start encoding proteins and enzymes adding to the entanglements. 5) Membranes appear isolating the entanglements from the environment inventing cells. 6) DNAs are created from RNAs forming the modern biochemical tri-unity of DNA, RNA and proteins.