Should I buy a crank, derailleur, cassette, etc. all from the same company or are the parts of the drivetrain not super specific I am looking to build my own bike and was wondering whether the bike and the drivetrain would work better with matching parts or not. I work at a bike coop and it would be much cheaper to be able to use random parts. I want to know if that would be smart or if I should by the parts in a set from the manufacturer (with a price tag if possible). Thank you! 
If you need me to be a little bit clearer feel free to ask.
It's complicated. 

There are many groups of parts that will work together just fine, and many that will not. You can mix and match brands in any number of ways and have it work fine.

Buying everything together is an expensive way to guarantee that everything will Just Work. 

You can put something together for much, much less money using random bin parts from your co-op. But, you will still have to pay for it with your own research work, in learning all the different ways that the components have to fit together.

The good news is, putting a bike together isn't rocket science. There is detail that you will need to learn, but you can learn it.