Improve compatibility of arrays with CGRect and CGSize