Luckily I figured this out early on. The first time I tried dismissing Piper it asked which settlement I wanted to send her to, but I didn't want to send her to one. I just hit 'tab' trying to cancel it, and it said she was going back to Publick Occurences.
I keep her at Sanctuary now, but I like it more when some of the companions stay at home. I like Nick Valentine to stay at the detective agency because he...well...has a detective agency to run. I keep Paladin Danse at the Prydwen because I figure as a high ranking officer of the BOS, he should stay there. Hancock is the mayor of Goodneighbor, so it seems logical to keep him there.
I keep Piper, Cait, MacCready, Codsworth, and Dogmeat at Sanctuary. Preston stays at the Castle. I keep Strong at the Finch Farm because he annoys me and I basically never go there unless I need to help defend it.