Prandtl's secondary flows of the second kind generated by laterally varying roughness are studied using the linearised Reynolds-averaged Navier-Stokes approach proposed by Zampino et al. (J. Fluid Mech., vol. 944, 2022, p. A4). The momentum equations are coupled to the Spalart-Allmaras model while the roughness is captured by adapting established strategies for homogeneous roughness to heterogeneous surfaces. Linearisation of the governing equations yields a framework that enables a rapid exploration of the parameter space associated with heterogeneous surfaces, in the limiting case of small spanwise variations of the roughness properties. Channel flow is considered, with longitudinal high- and low-roughness strips arranged symmetrically. By varying the strip width, it is found that linear mechanisms play a dominant role in determining the size and intensity of secondary flows. In this setting, secondary flows may be interpreted as the time-averaged output response of the turbulent mean flow subjected to a steady forcing produced by the wall heterogeneity. In fact, the linear model predicts that secondary flows are most intense when the strip width is about 0.7 times the half-channel height, in excellent agreement with available data. Furthermore, a unified framework to analyse combinations of heterogeneous roughness properties and laterally varying topographies, common in applications, is discussed. Noting that the framework assumes small spanwise variations of the surface properties, two separate secondary-flow-inducing source mechanisms are identified, i.e. the lateral variation of the virtual origin from which the turbulent structure develops and the lateral variation of the streamwise velocity slip, capturing the acceleration/deceleration perceived by the bulk flow over troughs and crests of non-planar topographies.