Sonar Major Warnings - Return copy of array instead of main created array.