Refactor function to searchSeparatePointOfRotateArray