Another possibility in situations where it is possible, might be approaching your team and saying, "I've been ordered to lay off one person from this team. None of you deserve to be laid off. I want to discuss if there is anyone who has other opportunities available and how we can help that person land on their feet, and I want to be clear that I can be the one to go if that's the best option."
Of course, either of these decisions happens in a context that has to be considered. For example if you have kids who will legitimately go hungry if you don't lay people off and get fired, you have to balance your responsibility to your coworkers with your responsibility to your kids. There are no silver bullets.
This isn't about never making mistakes, it's about taking responsibility for your mistakes when (not if) you make them. If you really have no choice but to lay people off, then you can do it yourself, to their face, with a clear conscience.
People at the top of organizations make the decision to lay people off, but it's middle and lower management that delivers the news. That's not right, and it's part of a pattern in corporations of upper management taking the profits and credit from success, and taking none of the costs or blame for failure. If that's what you want to do, you can do it without me.
Not just that, but people are willing to go above and beyond for empathetic leaders without being asked/cajoled/whatever.
Yeah, the article is right that laying off your friends, who likely did nothing wrong, sucks, but I think everything else can be done more or as effectively if you take time to build a better relationship with your team.