Refactoring the ARM intrinsics to match API review and share code with x86 (#25508)