Fwiw, this is complicated as fuck to make work financially and thankfully sportrac's new trade machine looks to have a pretty comprehensive grasp of the new CBA, I was able to make this work financially under the new rules
To Bucks: Beal
To Heat: Middleton, Brown, Boucher
To Suns: Jimmy
To Toronto: Portis, Connaughton, Duncan Robinson, Gary Trent (add any minimum player you prefer from Milwaukee, they need to send a body to us because they can't aggregate Beal's salary using multiple players because they're 2nd apron)
If a couple of the 1sts floating around in this deal found their way to us, I'd do this. Portis would be a really nice 6th man/PF that we could probably get to extend (has a player option next year) and would be a nice piece. Connaughton has a PO as well, but is likely to opt in. He's kind of washed now, but there are worse things to have with this group than a mid bench veteran with championship experience that D's decently well. Robinson is overpaid, but can shoot the ball, and would be a legit option to start at SF for us....he would obviously not fix our defensive issues, but his salary would be a nice trade piece next year and we could use the shooting in the interim.
Bucks would get their guy and clear up some salary issues they've been trying to clear up (while creating another issue, but desperation is a hell of a drug). Heat would sort out the Jimmy issue and get some assets out of it without damaging the team much this season. Suns get their guy and clear up some salary issues, and the Raptors would get useful rotation veterans using cap space they otherwise were going to have to go into free agency in the summer to fill (and lock that in for 3-4 years to get good players with it) while likely mopping up some draft capital along the way.