added functions in SGNDArray

@iglesias @hushell
Could you help me to check this patch? Thanks!
I think in SGVector and SGMatrix this is done with set_const. I suggest following the same interface.