Creating loops is a skill and an art. I've written numerous articles on how to create loops from scratch. Probably the most comprehensive one is
this one that was published in
Sound on Sound. Also go to
Harmony Central and search on
Anderton Loops
Plenty of articles will pop up, like
this one.
Here's one on
getting started with loops. And
how to create loops from an audio file (item 10 is of particular interest to SONAR users).
If you don't care about following tempo or pitch, there are other ways to create loops that minimize flamming. Also, note that commercial loop libraries are no guarantee of proper editing for stretching with either Acidized or REX files. One of the many reasons I use SONAR is because I can edit the loops in the Loop Construction window and fix sloppy editing.