add linear indexing with single multi-dimensional index. closes #2247