So I was just playing around with the new sentinel 2 image service provided by esri. The default is to show some logo, but only when I went to configure pop up in my AGOL map layer was I able to drill down to the pixel values. This is particularly useful when viewing reclassified data like NDVI or NDWI.
Unfortunately that method only works for WMS with a GetFeatureInfo request and not on a raster published as a REST Map Service. Also for the Sentinel WMS you have to load the INDEX layer and not the classified/symbolized RGB layer to get the MS index value.
This is probably me showing my lack of knowledge of web map layers, all I did was go here and open the layer in a map. If you go to image display you can choose from a whole host of rendered types, then adjust the configure pop-up and you get the pixel value. Unless it is something part of that layer I have not knowingly loaded an index layer? Are we talking about different types of datasets? Once you have got used to the quirks of AGOL I thought it a simple process for identifying a raster cell value.
I had a look at the source for the link you sent and it is an Esri Image Service, hence the reason why you could get the pixel value easily. The Image Service offers a lot more functionality than a raster layer published as part of a Map Service, which includes pixel identify.
FC Basson indeed, very true. Although you can also do it for a MapServer...
Raster popup Example: Example JSFiddle
I created an Idea to suggest Esri build this in as standard, to ArcGIS Online.. (Identifying Raster Cell values in ArcGIS Online 😞
Vote for my idea if you'd like it! I think it would be nice for Esri to build this into webmaps and ArcGIS Online for those who don't have access to a server or can customize code. Often, you might get a service from another agency and they only provide you a MapServer for example. And beyond elevation, raster popups could be useful for land cover or other quantitative data. This method is quick, it works, but the only caveat is you have to be able to customize the code. If it is built in to webmaps or ArcGIS Online it would open it up to everyone. Hope this helps.