change how createIndices works to support creating more than one type at one go.