A few words about חלילה.
Abraham argues with God over the matter of Sodom and Gomorrah, and he says (Genesis 18:25):
חָלִלָה לְּךָ מֵעֲשֹׂת כַּדָּבָר הַזֶּה, לְהָמִית צַדִּיק עִם-רָשָׁע, וְהָיָה כַצַּדִּיק, כָּרָשָׁע; חָלִלָה לָּךְ--הֲשֹׁפֵט כָּל-הָאָרֶץ, לֹא יַעֲשֶׂה מִשְׁפָּט.In the JPS 1915 translation:
That be far from Thee to do after this manner, to slay the righteous with the wicked, that so the righteous should be as the wicked; that be far from Thee; shall not the Judge of all the earth do justly?'"That be far from Thee" translates the Hebrew חלילה לך (chalila lecha). How can we understand these words? Rashi quotes one of the Targumim, which glosses the word חלילה as "חולין הוא לך" -- "it is unfitting for you", or, more bluntly, "not holy." It is unholy for God to kill the just with the unjust. (R. David Kimchi euphemizes: "It is to be avoided with regards to Your glory to kill the just with the unjust.")
That is one understanding. On the other hand, Ibn Ezra writes that חלילה is "something impossible . . . some say that the word can be related to חלול [chalul] -- hollow." It is an impossibility -- not unholy or improper -- for God to kill the just with the unjust.
Slightly different again are the approaches of the vernacular translations. Targum Onkelos renders חלילה לך as קושטא אנון דינך. Literally I think this means "Your judgment is true," but perhaps it is meant in astonishment: "Is Your judgment not true?" That is, can Your judgment be reconciled with such a deed? Finally, the Septuagint renders the phrase with the Greek medamos. All I know about Greek is what I see in the dictionary, and mine says that the word means "not at all."
Thus we can understand indiscriminate slaughter as inappropriate to God's glory or as a basic impossibility of Divine behavior. Unfortunately, the latter understanding (which I find more attractive) makes an understanding of history, and the Bible, rather difficult. As the Torah Temimah says (I'm paraphrasing; the sefer is in my hospital locker): "How is one to understand this, when we know that when the Angel of Death is given permission to slaughter, he does so indiscriminately? But the purpose of this work is not to indulge in long excurses." I wish he had indulged here.