fix Issue 8409 - Proposal: implement arr.dup in library
Fix indentation, and add nothrow attribute.
Add test case that array elements have non-mutable fields.