I think it's a second draft job. In the first draft, the horrible, messy, dirty draft, you just write in secondary characters as and when you need them. You might end up with several different people - a friend the main character has a argument with, the next door neighbour, a work colleague - all of whom have an individual scene with your main character.
Can you combine them? Could the main character have the argument with the work colleague? Could they take over the story function of the neighbour, or vice versa? The idea is have as few characters doing as much as possible, which leads to deeper, more interesting secondary characters, which leads to more for your main characters to play off.