Improve array-from-double[] performance and add test of def. copying.