Execute a sigmoid function on an array