Large-eddy simulations of nine idealized heterogeneous urban morphologies with identical building density and frontal area index are used to explore the impact of heterogeneity on urban airflow. The fractal-like urban morphologies were generated with a new open-source Urban Landscape Generator tool (doi:10.5281/zenodo.3747475). The vertical structure of mean flow and the dispersive vertical momentum transport within the roughness sublayer are shown to be strongly influenced by the building morphologies. The friction velocity and displacement height show high correlations with the maximum building height rather than the average height. Well-known roughness parametrizations of the logarithmic layer cannot adequately capture the large spread observed in the large-eddy simulation data. A generalized frontal area index Λf is introduced that characterizes the vertical distribution of the frontal area in the urban canopy. The vertically distributed stress profiles, which differ significantly per simulation, are shown to roughly collapse upon plotting them against Λf. The stress distribution representing urban drag can be fitted with a third degree polynomial. The results can be used for more detailed and robust representations of building effects in the development of urban canopy models.