I've always found stock buybacks intriguing and confusing. Here's a hypothetical scenario that seems to go against what you're saying:
Company A buys back $1 work of stock. Since there is now $1 less in Company A's bank account, that company is now worth $1 less. So the market cap should in theory be $1 less. Since the market cap should be $1 less, and $1 of stock disappeared, those perfectly balance out and mean the stock price should stay the same.
Now the index investors take a look at the situation. Company A's market cap has shrunk, whereas other companies' market caps haven't. So Company A has a smaller share of the index than other companies than it had before. But the index investors still have the old ratio of Company A to other companies, so they are overinvested in Company A. They all sell a bit of Company A in order to get the correct balance according to the index. Company A goes down in value.
So a stock buyback caused the price to go down.