Improved array_flatten() to flatten any depth.