We present some general theorems about operator algebras that are algebras of functions on sets, including theories of local algebras, residually finite-dimensional operator algebras and algebras that can be represented as the scalar multipliers of a vector-valued reproducing kernel Hilbert space. We use these to further develop a quantized function theory for various domains that extends and unifies Agler's theory of commuting contractions and the Arveson-Drury-Popescu theory of commuting row contractions. We obtain analogous factorization theorems, prove that the algebras that we obtain are dual operator algebras and show that for many domains, supremums over all commuting tuples of operators satisfying certain inequalities are obtained over all commuting tuples of matrices.