This can be stated in active form. AT: "what Jesus did to help the men whom demons had controlled" (See: [[rc://en/ta/man/translate/figs-activepassive]])
This marks the beginning of another event in the larger story. It may involve different people than the previous events. Your language may have a way of showing this.
The word "city" is a metonym for the people of the city. The word "all" is probably an exaggeration to emphasize how very many people came out. Not necessarily every person came out. (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-hyperbole]])