Refactor Model's ID getters and toArray

Re-use model's `getId` in `toArray` to allow to override the *default id* behaviour.

@alexispeter @cm-jan please review