Fix `std.traits.hasElaborateAssign`

Fix `hasElaborateAssign` for static arrays.

Other changes are extracted to pulls #1260 and #1261.