My question involves criminal law for the state of: WA

If for some reason I get arrested, what is the recommended procedure to find and hire a good lawyer while being detained?
Don't ask me arrested for what, because I have no idea. Most likely police mistake.

I guess this can be split into two questions: how much time and what methods (phone calls? email?) would the police give me to find a lawyer? And how do I come up with a lawyer/law firm to call out of the blue? Should I google for the top criminal law firm in the area? Assuming I'm allowed access to a computer or my smartphone.

Is it a good idea to ask for a public defender, and then ask the public defender to help find a good private lawyer?