Optimized sf_array_from_collection() when collection is an array.

The function will simply return the collection when it is an array rather
than creating a copy.  Added unit test for this.