So you want an array containing a bunch of functions which you can call at a later stage?
In that case you would need something like this
val units = arrayOf({println("printFoo")}, {println("printBar")})
and you can call it using
units[0]()
// or
units[0].invoke()
The reason for this is, if you use your original code, you call println twice with 2 different arguments and store the results of this function call in the array. println does not return anything though, which is not actually true. Every function in Kotlin that has no explicit return type returns the Unit object. That’s the reason why your above code does compile. You just get an array containing Unit twice.
I suggest you take a lookt at higher order functions. There are a lot of useful things you can do with them and understanding them is important to use Kotlin efficiently IMO.
If the functions all have the same signature, you can also do this using function references:
typealias Func = (String) -> Unit
fun main(args: Array<String>) {
val units = arrayOf<Func>(::println, ::println)
units[0]("printFoo")
units[1]("printBar")
}