Added ability to populate attributes using array input.