A Framework for Radio Resource Allocation and SDMA Grouping in Massive MIMO Systems