Some of the possible genres are:
1. Cantus firmus chorale prelude (the melody is treated in equal note values once in one of the voices)
2. Ornamented chorale prelude (the melody is presented in figurative manner in one of the voices once)
3. Canonic chorale prelude (the melody is presented in canon between two or more voices)
4. Ritornello chorale prelude (like cantus firmus chorale prelude but with a recurring melody between chorale phrases in various keys)
5. Chorale variations (consist of a number of chorale preludes created in different techniques)
6. Chorale fughette (3 or 4 voice imitative treatment of one phrase of the melody - fugal exposition)
7. Chorale ricercar/fugue (more advanced and longer imitative treatment of one phrase of the melody)
8. Chorale fantasia (imitative treatment of every phrase of the melody using various techniques, including ornamented chorale, canonic chorale, cantus firmus chorale, solo and chordal echos etc.)
9. Versette (a short piece where a portion of the melody is treated to create a binary or ternary exposition)
Some of the most common textures are polyphonic and homophonic. In polyphonic texture several more or less independent melodies interact with each other. Those melodies can be similar (imitative polyphony) or different (contrasting polyphony).
In homophonic texture there is one voice which is the most important (the melody) and other voices that serve as an accompaniment. The accompaniment can be treated as figuration (figurative homophony) or as chords (chordal homophony).
Consider these options, if you want to use any kind of melody for your improvisation.
Transposing Sequence in D Major: I-vii65o-I6