A unified Lloyd-based framework for multi-agent collective behaviours