Fix Array.append with an empty array

Fix #647
Add tests for appending to empty arrays
Merge pull request #650 from Xashili/patch-2

Fix Array.append with an empty array