Cut the onions in half and then slice them into thin half-rounds, approximately 1/8-inch thick. Set aside.
Heat the butter in a large skillet over medium heat. As the butter melts, add the onions, salt, pepper, and cayenne and cook for 10 minutes, stirring frequently. Reduce the heat to medium-low and, while stirring occasionally, continue to cook the onions for an additional 20 minutes. The onions should be nicely browned and caramelized. Set aside to cool.
In a large bowl with a handheld mixer or the bowl of a stand mixer fitted with the paddle attachment, beat the cream cheese, mayonnaise, and Greek yogurt/sour cream until smooth. Add the onions and beat again until everything is combined. Allow to chill in the refrigerator at least 30 minutes before serving. Store leftovers in the refrigerator covered tightly up to 5 days.