I am using php in views and trying to make a custom field to remove the duplicates in [field_trucks_notification_no_ref_node_eb:field_trucks_agency] field, i tried to use the row->field_name from the available variables in Global:PHP (output) with no luck.

     stdClass Object
        (
            [entity] => 268
            [_entity_properties] => Array
                (
                    [search_api_relevance] => 1
                    [search_api_excerpt] => 
                    [search_api_id] => 268
                    [field_cons_country_border] => 35604
                    [field_trucks_notification_no_ref_node_eb] => Array
                        (
                            [0] => 269
                            [1] => 272
                            [2] => 278
                        )
        
                    [field_trucks_notification_no_ref_node_eb:field_trucks_agency] => Array
                        (
                            [0] => 35617
                            [1] => 35621
                            [2] => 35617
                        )


How can I retrieve the values of the last array above and remove duplicates?