Sequential Resource Allocation Under Uncertainty: An Index Policy Approach