Merge arrays and objects during inheritance