Converts an AR model to an array, includes associated relations