Paying a player in advance can be either a discussed component of the contract, or can be merely a gesture. For example, the negotiation would be along the lines of
"Okay, we've agreed on giving you $1M across 4 years. Due to needing to meet the cap minimum, we'd like to front load your contract so that we pay 400/400/100/100. After doing that, we still have some room in the cap - what if we make it $1.4M over 4 years, and we considering this extra money as part of your next contract, since this will allow us to free room in the future to bring more talent to the club and increase your chances of a premiership".
Any player not entirely driven by money would accept that, as they lose nothing in exchange for improving the quality of the list in the future.
Don't forget that this was done, in reverse with Goddard. Part of the reason why he left was because he was promised a bigger contract in the future, in lieu of adequate payments on the contract he was on, in order to keep the team together. Then, Pelchen came along and decided that this understanding was to be thrown out and the rest is history.
In the case of a gesture, the club may just pay extra as a "favour" and when the day comes, the club will call upon the player to do a service for them....
There'd be some egg on our faces if we did that and then they thought to themselves "Hold on a minute, understanding? Stuff that, who's stopping me getting more money elsewhere?"
Nothing is stopping a player from doing that. One would hope that they're not so greedy that they'd impair their prospects for footballing success for a bit of extra coin. But, if they decided to do it (either by refusing to acknowledge it when re-signing, or by leaving to another team) then the club hasn't really lost anything because the cap space wasn't going to be used, anyway.