How do I write music that goes places without being too abrupt tonally/stylistically?
The most important factor is to have something to say / have an image in your mind of what you want to express, and let that guide you throughout the piece. End the piece when it is 'done'. Go purely on feeling here. A good way of sounding cohesive and not too wayward, is to use the same colour pallet. in music's case this is your initial sound pool. Look at techno, the best techno uses very few elements but somehow its interesting throughought a whole 8 minute arrangement or so. Little details/changes go a long way. Have dynamics represent the 'places' - loud, quiet, sparse, full, slow, fast etc. Also look at it as a story, create a beginning, middle and end.
To stop getting stuck on a loop, figure out what your main reason for the song's existence is, this will be your main section, say 8 - 16 bars long. So copy this for the duration of a song length. Now you technically have a finished song. You could export it as it is, but obviously any creative would want to do more than just loop up an idea. So now go to the start, and begin turning the first 16/32 bars into an intro - stripping elements right back, introducing each new elements over a period of time, but save a few elements until the main section (33rd bar eg).
Now you have an intro for 32 bars, a main section for 32 bars, and now you can work on a B section, modifying the A section, then a little breakdown where you can introduce something new to add interest, then you can go back to your A+B section and then create a little outro, and you can begin to see how you can create a whole song out of just a loop. Also it will also be tonally/stylistically cohesive as you use the same colour pallet for the most part.
This can be seen as quite cynical/generic way of approaching composing, but I'm into the idea of restrictive, traditional song form, paired with unique/experimental ideas within that framework.
imo imo imo etc