I couldn't stand to have my companions around any place I frequent. Traveling with them is fine, but when they are idle they can get annoying with their repeated lines ... particularly in places like the Castle where they will comment about what shape it's in over, and over.
Still, if I had to assign them ...
Cait would be a guard. She likes to fight too much to be relegated to manual labor.
Curie would, of course, be the doc.
Piper would probably run the bar ... barkeeps are gossips and so is Piper.
I'd make Nick the scavenger. I always create a 'police station' and put the scavenging station in a back room out of sight. Because the scavenger patrols with a weapon, it makes him look like a cop going in and out of the police station and patrolling the settlement.
Codsworth is a butler. He should buttle. But, I don't think he's assignable, is he?
Deacon would remain unassigned so that he'd sandbox around the settlement. He'd be my spy, using his amazing ability to change clothes when nobody is looking to confuse and amuse the other settlers and tell me who is and isn't trustworthy. Of course, I couldn't believe anything he said about them.
MacCready and Danse would have to be guards, if I couldn't make them provisioners.
Strong would be arena fodder when Wasteland Workshop comes out. Come to think of it, so would MacCready, Danse and Preston.
I'm not familiar with Hancock or the institute synth ... I don't play the sort of characters who would ever recruit them.