Assign val to all places in the input array of arrays.