code: func unionArrayRun(a, b *Container) *Container {
  	statsHit("union/ArrayRun")
  	if b.n == maxContainerVal+1 {
  		return b.Clone()
  	}
  	output := NewContainerRun(nil)
  	aa, rb := a.array(), b.runs()
  	na, nb := len(aa), len(rb)
  	var vb interval16
  	var va uint16
  	for i, j := 0, 0; i < na || j < nb; {
  		if i < na {
  			va = aa[i]
  		}
  		if j < nb {
  			vb = rb[j]
  		}
  		if i < na && (j >= nb || va < vb.start) {
  			output.n += output.runAppendInterval(interval16{start: va, last: va})
  			i++
  		} else {
  			output.n += output.runAppendInterval(vb)
  			j++
  		}
  	}
  	if output.n < ArrayMaxSize {
  		output.runToArray()
  	} else if len(output.runs()) > runMaxSize {
  		output.runToBitmap()
  	}
  	return output
  }
docs: // unionArrayRun optimistically assumes that the result will be a run container,
  // and converts to a bitmap or array container afterwards if necessary.