added function arrayMergeReplaced to CFun