You can't extract the print a heart "code" from DNA, that's not how DNA or development works. Each organ develops according to a pattern influenced by all the other surrounding tissues. It's quite an intricate dance, with folds and migrations occurring at specific times. That's why you can't regrow lost digits or limbs, or replace damaged brain tissue: the connections those pieces make with the rest of the body are only possible during a specific time in development when all the correct cues and relationships are there.
In other words, to generate an organ the way it is generated in an embryo, you need a whole embryo. To generate one to an adult size that way, you need to grow a whole adult. Science fiction has used this as a plausible approach, but real society finds it problematic to grow people for the sole purpose of organ harvesting.
Read, for example, the Wikipedia article on heart development:
In the splanchnopleuric mesenchyme on either side of the neural plate, a horseshoe-shaped area develops as the cardiogenic region. This has formed from cardiac myoblasts and blood islands as forerunners of blood cells and vessels. By day 19, an endocardial tube begins to develop in each side of this region. These two tubes grow and by the third week have converged towards each other to merge, using programmed cell death to form a single tube, the tubular heart.
From splanchnopleuric mesenchyme, the cardiogenic region develops cranially and laterally to the neural plate. In this area, two separate angiogenic cell clusters form on either side and coalesce to form the endocardial tubes. As embryonic folding starts, the two endocardial tubes are pushed into the thoracic cavity, where they begin to fuse together, and this is completed at about 22 days.
The only place you get a splanchnopleuric mesenchyme to start with is going to be a developing embryo. The heart is forming from different clusters of cells migrating and differentiating in a particular pattern.
Scaffolding is more of a trick. It gets you away from the organ-level patterning that shapes the entire structure and lets you deal with just the functional units: individual cell types like myocytes that behave sufficiently robotically that if you create approximately the right conditions they will settle in to do their job.