You generally want this compilation target:
// uses texture arrays, so needs DX10/ES3 which is 3.5 target
#pragma target 3.5
Inside Properties block: _MyArr ("Tex", 2DArray) = "" {}
Declare the texture array sampler inside CGPROGRAM: UNITY_DECLARE_TEX2DARRAY(_MyArr);
Sample it: half4 col = UNITY_SAMPLE_TEX2DARRAY(_MyArr, uv); // uv is float3, .z is the slice
In case of surface shaders, you can use something like