toArray

fun toArray(): Array<Any?>

The elements as Kotlin sees them: holes and undefined become null.