They didn't really build it from scratch. They bought the NUMMI facility and (IIRC) some of the equipment from Toyota.
In any case, how they use the equipment is completely custom to their needs, as in any other factory.
Love the setup. Great PR. Can't wait 'til the S starts to ship.. it's going to be a good year for Mr. Musk.