Simplified output array creation.