[Minor] Improve some code in BroadcastTest for short

Using 
    val arr1 = (0 until num).toArray 
instead of 
    val arr1 = new Array[Int](num)
    for (i <- 0 until arr1.length) {
      arr1(i) = i
    }
for short.