You might want to distinguish between "population standard deviation" and "sample standard deviation". If the elements in the array represent the complete population, you should use n instead of (n-1). If the array contains random elements from a larger population, then you would use the (n-1) in the denominator before taking the square root (sample standard deviation).