Here is a simple example with some basic shapes and a hair particle system.
- First create a collection with the shapes that you want your city to made of, here it is just some simple shapes to represent the general idea, that will be scattered arbitrarily across a plane.

In the render section below, choose collection and select the collection that contains your objects. Here are my settings:

Next, go into weight paint mode, and paint the areas on your ground that you want the buildings to be. Go back to Object mode when done.
Now, in the particle settings, under vertex groups add the new group available under density. Rename it if you'd like, or leave as default "Group".

You should end up with something like this (again arbitrary placement):

As for random placement of material, a method I like to use is a node tree like below:
click to enlarge
The Principled Nodes can be replaced with anything, what is crucial in this setup is the coloramps (set to constant interpolation)and the object info/ random. They can be chained for as long you like to give random results for particle systems and linked mesh objects.
