Change stdout to array object