Modify raw SQL if parameter bindings are arrays

If any raw sql parameter bindings are arrays, automatically insert the correct # of ? placeholders in the sql string, and flatten all parameter bindings into a single array.