clone/copy objects and arrays