Update Array Object With Spread Operator Kotlin Vs Java