Properly convert arrays received on input.