I’m a bit confused by your descriptions of what the current status is, but a couple things that might help….
Almost all non-residential loans (including apartments of more than 4 units) written in the last 20 years are due on sale. Since you say the property is newer, it’s highly unlikely that the loan is assumable by contract. That doesn’t meant it can’t be assumed, just that it would require negotiation with the lender, probably involve the payment of points/fees and underwriting just as if it is a new loan.
There is no way you will be able to assume an existing loan at foreclosure by that loan. The possibility exists that you may be able to negotiate with the lender prior to TS, including negotiating the arrearages. Since you already hold the junior loan, you obviously have leverage as well as the 2nd most to lose.
If you were to foreclose on your note, the whole thing may be different. It sounds like it’s too late for that to happen? I’m not familiar with AZ law, so it is possible that a foreclosure of a junior lien does not trigger a due on sale event, but in any case, it does put you in a stronger negotiating position.
Be careful, if you’re not in the right place at the right time, with the right amount of cash on hand, you could easily be wiped out. And be careful not to throw good money after bad. While Yuma hasn’t been hit near as bad as the Phoenix area (it never went up as much either), the rental market in most parts of Yuma really sucks right now. Lots of vacancies. And there is no good reason to assume that it will ever come back. It is over-built and there is almost no good reason for anyone to ever want to buy (or live) there.