Add arrayDims function (does something else than the old one).

Express arrayRank in terms of it.

Also fixed some misleading documentation related to arrayRank.