In Mozart's day, every musician learned the same scales and arpeggios on their instrument as students learn today. However, they did not learn them to pass examinations; they used them as a basis for the study of harmony, improvisation and composition.
Mozart's melodies are based on scales and arpeggios. They work hand in hand with the chords which structure a piece of music, and which are easy to build from the notes of any major or minor scale. The skill of improvising in the style of Mozart involves understanding of some basic principles and practice in applying them. These basic principles are concerned with: (i) construction of chords; (ii) connection of chords with one another and (iii) embellishing of chords by means of scales, arpeggiations, ornaments and decorations.
Once you know how to use two simple chords and how to play a scale on your instrument you can start to improvise. It's not at all difficult to add decorations and embellishments and you can be as creative as you like. When you have learned to improvise on two chords you can add another and another, until your improvisations begin to sound really accomplished. Writing around the time of Mozart's death, the French composer Gretry boasted that he taught his young neice to improvise by the application of simple rules (and a lot of practice) such that in two months she astonished his fellow composers.
Improvisation is an essential attribute of any musician. It's easy and it's fun and it allows anyone to express their musical ideas. It takes a bit of work but it's worth it.