refactor batch insert to just allow accepting arrays in insert