added functions in SGNDArray

@iglesias @hushell
Could you help me to check this patch? Thanks!
Maybe passing index_t* is not a bad idea, since the member dims has type index_t*.