array combine function