I cannot get any clue on the differences between these 2 functions of Array type.
Can anyone explain by examples?
see the function signatures in the Developer Documentation and follow those to some explanations of the use of the various types of buffers and buffer pointers.
func withUnsafeMutableBytes<R>((UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R
and
func withUnsafeMutableBufferPointer<R>((inout UnsafeMutableBufferPointer<Element>) throws -> R) rethrows -> R
an UnsafeMutableRawBufferPointer is simply a pointer into untyped memory. It is just a bag of bytes. an UnsafeMutableBufferPointer is a pointer into typed memory. Each element is of type Element. It is a bag of Elements.
You may need to use these APIs to interact with C APIs which take pointers to void *, char * or expect a contiguous array of Elements.