Ah... a case for the "magick sprinkles" of breakOut. Not only does it give you the collection type you want - it does it efficiently, without wasting an extra transformation.
object Foo {
import scala.collection.mutable.ArrayBuffer
import scala.collection.breakOut
val inarr: Array[Double] = Array()
val arrarr: Array[Array[Double]] = Array()
var diffmat: ArrayBuffer[ArrayBuffer[Double]] = (for (row <- arrarr) yield {
(ArrayBuffer[Double]() /: (row zip inarr)) {
(outrow, cell) => outrow += cell._1 - cell._2
}
})(breakOut)
}
The definitive writeup (IMHO) of this is Daniel Sobral's answer.