I see a lot of people criticising Cersei for arming the Faith and claiming that this is what ultimately brings about her downfall, but it isn't.
This man came into power through force. He had his Sparrows drag a Septon, naked, out of a brothel to remove him from the race, then had them carry him, armed, into the voting booth to get him elected. Yes, it's Cersei's fault that the previous High Septon died, but given how the Sparrows behave, it was only a matter of time before they murdered him. This, along with our first meeting with the High Sparrow, where the Great Sept is already guarded by armed Sparrows, shows us that this man already had an armed force at his disposal. Cersei simply made it official.
Another thing to remember is that this man was already having the most devout followers clean floors and confining them for penance, showing that he was already fanatical and uncompromising. It shows that he was already the kind of man who would have arrested Cersei regardless of whether she had armed the Faith. .
The Warrior's Sons number only around a hundred and are supplemented by the Poor Fellows. This is hardly a force that would give a man the audacity to arrest two queens who are also the daughters of the two most powerful houses in the realm. The Gold Cloaks alone would overpower them.
The confidence the High Sparrow displays comes from the fact that he knows most lords would be reluctant to spill blood in the Great Sept, but, above all, it comes from his own monstrous madness. He is simply a mad, zealous fool.
Even if Cersei hadn't officially armed the Faith or framed Margaery, she would still have found herself in a cell. Lancel would have brought forth the charges, and the High Sparrow's madness would have compelled him to arrest her.
In fact, before the reinstatement of the Faith's military forces, the High Sparrow had already refused to bless Tommen, stating that he wasn't certain whether Tommen was the true king.
Edit: I had also forgotten that when Cersei meets him for the first time the kingsguard are barred from entering armed yet Cersei sees knights at the warrior seeking blessings for their swords piled at the alter