If I'm Detroit I probably make a team that wants Grant also take on Plumlee to clear his salary off the books. So with that in mind, I think you'd have to do 2 trades.
So trade 1
Theis, G. Williams, Edwards, Nesmith for Plumlee, Ellington
Trade 2
21 and 23 1sts for Grant
Puts Boston into the tax, but below the hard cap and I think there is enough room for 1 buyout candidate. And I did the trades that way because the 1st one creates a 2.8 TPE for Boston and the second gives Detroit a 19 million TPE so it adds value and Boston still has basically a MLE sized TPE left on the Hayward one to use this summer.
So post-trades with 1 open roster spot
Starters - Walker, Brown, Tatum, Grant, Thompson
Rotation - Pritchard, Teague, Smart, Ellington, Langford, Ojeleye, R. Williams, Plumlee
Deep Bench - Green, Waters, Fall
I don't know if that team can really hang with the top tier contenders this year, but it is certainly in a much better position to do so.