Or do you sometimes get ideas for melodies that need to be harmonized before they're inserted into songs?
would never insert a melody into a song. build the song around the melody (which comes with chords baked in by default, of course. standard company policy)