code: func copySliceToTable(L *lua.State, v reflect.Value, visited visitor) {
  	vp := v
  	for v.Kind() == reflect.Ptr {
  		// For arrays.
  		v = v.Elem()
  	}
  
  	n := v.Len()
  	L.CreateTable(n, 0)
  	if v.Kind() == reflect.Slice {
  		visited.mark(v)
  	} else if vp.Kind() == reflect.Ptr {
  		visited.mark(vp)
  	}
  
  	for i := 0; i < n; i++ {
  		L.PushInteger(int64(i + 1))
  		val := v.Index(i)
  		if isNil(val) {
  			val = nullv
  		}
  		goToLua(L, val, false, visited)
  		L.SetTable(-3)
  	}
  }
docs: // Also for arrays.