Updated Object toArray to clone values