The structural outlines of a contract aren't the issue. It's the real numbers of the cap, and the roster, and for the positional groupings within the roster.
The Pats have $18.1m in cap space to start 2019 (Miguel's number).
Williams would immediately hit the cap for $14.2m.
While there appear to be ways to increase cap space, not all of those that have been suggested are realistic - either financially for the player, or logistically for the roster.
Then there are the expenses that most folks haven't accounted for:
.... in-house free agents (22 of them)
.... the 12-man draft class
There really isn't "always a way" that still makes sense for the team.