Controlling Nanomaterial Self-Assembly for Next Generation Optoelectronic Applications