Revert "only convert Array{T} to Ptr{T} or Ptr{Void} (fix #6073)"

This reverts commit 97582fb0d54be66fa8d8b63a272f7ad7598b3f39.