All other factors being equal and based on the fact that (a) the cat’s owner is at home a great deal of the time and (b) the owner interacts with her/his cat a lot of the time and (c) the home environment is cat friendly, then I believe that it is more likely that an indoor cat will be more affectionate than a cat who lives indoors and outdoors.
The reason is that there will be more interaction between cat and human and their interaction will be in a calm and friendly human environment. These factors will help to make the cat more domesticated and socialized and it will help to create a greater bond between human and cat.
It is probably fair to say that the greatest influence as to whether a cat is affectionate or not is their inherited character. But as I said if you take two cats with very similar characters and one of them lives indoors full-time and the other spends time both inside and outside then I would suggest that the full-time indoor cat might end up slightly more affectionate in the long term.
I have also found that when cats that go outside a lot they tend to revert to their wild nature. It may take a little while when they come inside to cast off their natural, wild instincts and become domesticated again. During this ‘transition’ the cat is less domesticated. Cats do revert to their wild nature quite readily. As is said, domestic cats are barely domesticated.
The constant pressure of domestication living full-time inside would, I believe, tend to develop a calmer and less wild nature which could lead to a more affectionate character.
There is no science on this as far as I know and I am speculating. People may well have differing points of view on this subject.