I am reading We are Legion, by Dennis E. Taylor, in which humanity has developed the so-called 3D atom printer, briefly described as:
3D printers delivered individual atoms using a number of tuned carbon nanotubes, each sized for specific elements. (...) as you had to place individual carbon atoms, one after another, with zero defect.
They are able to print any material by placing individual atoms, and thus their only concern is obtaining raw matter. In the book series the main characters resort to mining asteroids and planets to obtain the raw material needed to 3D print things.
I wonder what alternative methods (if any) science fiction has given to sufficiently advanced civilizations for collecting massive quantities of raw matter. Something like mining dark matter, for example. Soft(er) science fictions are welcomed, too.