arp: write properly sized addresses

Don't assume that the hardware addresses are within HWAddrLen and that the
protocol addresses are IPv4.