You're right that Aquinas would have rejected the notion that gods are software installed in the hardware of believers, but he was not a dualist - he advocated a kind of hylomorphism that doesn't map neatly onto contemporary philosophical categories:
https://en.wikipedia.org/wiki/Hylomorphism#Thomistic_hylomor...