Convert Collections instead of Lists to arrays of primitivse