Yes. It is not necessarily efficient, though. (It can be difficult to get right, and may be easier in many cases to use contiguous datasets.)