You can pass a 3D array to a function or subroutine as if it were a 1D array, as shown in the code below. I don't recommend using this feature, but you will see it in pre-Fortran 90 code.
program xarray
implicit none
! demonstrate storage association
integer, parameter :: n1 = 2, n2 = 4, n3 = 3
integer :: i1,i2,i3,arr(n1,n2,n3)
forall (i1=1:n1,i2=1:n2,i3=1:n3) arr(i1,i2,i3) = i1 + 10*i2 + 100*i3
print*,"arr =",arr
! output: arr = 111 112 121 122 131 132 141 142 211 212 221 222 231 232 241 242 311 312 321 322 331 332 341 342
call print_array(arr,n1*n2*n3)
end program xarray
subroutine print_array(arr,n)
implicit none
integer, intent(in) :: arr(n)
integer, intent(in) :: n
print*,"arr(1), arr(n) =",arr(1),arr(n)
! output: arr(1), arr(n) = 111 342
end subroutine print_array