Procedurally building animal models

I’m embarking on a daunting task and am hoping to get some advice on where to start. I’m working on a genetics simulation and I want to be able to take the genetic traits of an animal and build a 3D representation using primitives. What this would look like psuedocode wise is this:

  1. Make a sphere to be the body.
  2. Attach boxes to the body at specified points depending on the number of legs the animal has and their relative sizes.
  3. Continue building outwards (feet, toes, etc).

So my two big questions are:

  1. Where should I be looking to figure out the basics of this sort of system.
  2. How much of this (particularly bones) should I be doing as part of a pre-made model and how much of should I be generating in-code?

Thanks in advance for any advice.

You can do everything with code. Bones for skinned meshes are nothing more than transforms.

The script on this page Unity - Scripting API: Mesh.boneWeights has an example of building a skinned mesh entirely through code.