St Thomas refers to Aristotle, Metaphysics, V, 3, a brief and obscure passage which he expands.
Of God and His Creatures: 3.94