Data cast type helper for the primitive array in CLR function code