There's no "automatic" way to do it in SONAR, no generators.
If the guitar is played to metronome (assuming you know the tempo) simply compose/play the drum track or drag in the MIDI loops of the drum software, depending on what version of SONAR you are using. Just set the right tempo for the Project.