One interesting means of doing this is grammar induction[0]. NMS's appears to have a defined pattern for say a spacecraft IE wings go here, cockpit goes here, engine goes here and then choosing a block for each of them. With grammar induction one can learn more interesting designs by learning the relationship between parts. IE cockpit A tends to connect to hull C, wings N tend to connect to hull C. This lets us make spacecraft that have different topologies that still follow the same sort of style defined by some exemplars.
[0]http://hci.stanford.edu/publications/2012/Talton12LDPBG.pdf