Make the local_ports_array= method more readable