>However, mad wizards - megalomaniacal persons with lust for power and disregard of others - with enough resources might manufacture a machine army.
I've had a novel (as in writing a book) idea rattling around in my brain with something like this.
A distributed AI living throughout the collective internet has humans unwittingly (or select few recruited to wittingly) manufacture a machine army for it.