get a typed array constructor by specifying the type as a string