I believe this can be done using the Style Wizard feature of the Stylemaker. I did this back in the 90's. There was a company called Twiddly Bits that use to provide midi phrases that were meant to be used in sequencers. One of the offerings was a variety of arpeggiated chords. Since BIAB at that time had no midi arpeggiator, I created an arpeggiator style using the stylemaker wizard. The wizard analyzed a standard midi file (SMF) and presented identified phrases to be included in the style. Once the style was created the Twiddly Bits phrases followed BIAB chords.
The MIDI stylemaker had been ignored for years as BIAB focused on RealTracks. But I believe it has been revised somewhat to treat MIDI loops similar to RealTracks. I think the original MIDI Stylemaker, while ugly looking by today's standards, was really very sophisticated. You could add as many different phrases for each legacy instrument as you wanted for A and B parts. In addition, you could assign a probability to each phrase to make it more or less selectable. I remember using masks to allow phrases to be used only in certain bars. I think Notes Norton had mastered these techniques in creating his sophisticated MIDI styles. I think the Stylemaker Wizard may accomplish what you are after.