Congratulations on the new puppy, that's very exciting. Reading your post, a several things occur to me. First, he's still a baby who just left home and what/whomever he knows. All those exciting aspects of coming to you also can be overwhelming, especially if the breeder didn't socialize him well or at all. By socialize, I mean gradually expose him to new surfaces, environments, people, objects and gradually teach him how to respond to those new things. Whatever may/may not have happened with the breeder, I always think it's a good idea start over with that socialization whenever I get a new puppy/adult. He may have been the star you described at the 5K OR he may have been a stressed puppy who, because he's unsure of you, looked for reassurance from everyone he met. Reassurance-seeking behavior and sociability can look very similar. Finally, it doesn't sound as though he's been taught how to walk on a leash. Zig-zags are understandable at 12 weeks; in a 4 month old, it says to me there are some holes in his basic training. Mind you, I'm not saying he should execute perfect heeling. But he should be able to walk reasonably quietly along with you.
My advice would be to slow way down, start over as though he knows nothing, and slowly teach him all the things that you want him to know (e.g., his name, come, sit, down, place, when/where to potty, etc). Limit his exposure to crowds, strange dogs and dog parks until he's more sure of you. I suspect that he's not right now, so focus on building a relationship with him. He doesn't know what to expect from you (hence some of the "wildness," I'd bet), so you have to teach him. Short, happy sessions throughout the day would be a good place to start as well as establishing a predictable and structured schedule for meals, walks, potty and play time, etc. Make it all fun! Not wildly exciting, but certainly enjoyable.