We studied the formation of buried heterostructures obtained in a single growth step over nonplanar substrates patterned with ridges. When the ridge dimensions are large enough, the growth on the mesa top is similar to that on a planar substrate. In contrast, ridge spacings below almost-equal-to 10 mum influence the composition of the alloys grown on the ridge as well as those grown in the valley centre. The possible surface mechanisms which may explain this behaviour are discussed.