Converts an AR model to an array, retaining associated relations.