Well, you are not doing anything wrong, it has to do with type class constrains.
Here is a version that works
The problem is that in your initial version the type of `amap` is
For (soundness of) Liquid Haskell, the fact that the type variables e and e' are constraint by class constrains means that `amap` could create arbitrary values of type `e` and thus Liquid Haskell does not instantiate `e` with your desired refinement type {Int | pIn <= 255}.
The "fix" in the link above is to create a `mapArray` instance of `amap` without class constrains on `e`, that is (in the above link)
mapArray ::(Ix a) => (e' -> e) -> Array a e' -> Array a e
mapArray = amap
The above type holds _for any_ types `e` and `e'`. In your code both `e` and `e'` will get instantiated in your desired refinement type {Int | pIn <= 255} and verification succeeds.
Best,
Niki