Not all Arab nations are united in their beliefs or how government / religion should be linked.
Saudi for example has absolutely no love for Iran. Saudi maybe a muslim Kingdom ran by Sultans. But Iran is a Theocracy ran by the Clergy and is far more hell bent on spreading their form of religion to even the other Muslim nations. Jordan for example is fairly secularly run Kingdom. Iran despises that too.
As for “Sides”. Israel has existing peace treaties and open relations now with several of it’s neighbouring muslim nations. Egypt and Israel have been allied for decades now. Egypt maintains a border wall and blockade of Gaza as well. Jordan and Israel have been fairly peaceful now for decades. And Lebanon frequently looks to Israel military support to quell Hezbollah. Up until Oct 7th, Saudi Arabia was also in negotiations with Israel to normalize relations towards a peace deal.
As you said in your edit, the situation is extremely complicated, because it involved groups that are historically opposed for generations, if not centuries.