Speed up array conversion