Repository: TypeScript
Issue: Using 'Key in keyof ArrayType' always returns an Array regardles of the value manipulation applied
Labels: Needs Investigation

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

**TypeScript Version:**  4.0.0-beta (same behaviour in version 3.5.1 [v3.5.1-Play Ground](https://www.typescriptlang.org/play?strictPropertyInitialization=false&useDefineForClassFields=true&allowUnusedLabels=true&noEmitHelpers=true&noUnusedLocals=true&noUnusedParameters=true&esModuleInterop=false&preserveConstEnums=true&declaration=false&target=99&jsx=0&ts=3.5.1#))

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
"key in keyof Array", "keyof Array"

**Expected behavior:**
using ```key in ArrayType``` has the same behaviour as on any object *(returning an array type only if the relevant properties are unchanged)*

**Actual behavior:**
using ```key in ArrayType``` performs actions on touple entries but the returned type allways includes all default Array properties

***Extention note:***
Not the point of this issue and i know there are other issues around this topic. it's just a note,
but how about possibly adding tupple functionality for ArrayLike-, Map- and Set-types? They have all the basic qualities of a tupple, and it would be awesome to use them in a similar fashion (especially inference of ```Map.prototype.get/set``` and ```[Symbol.iterator]``` inference of tupples)

<!-- Did you find other bugs that looked similar? -->
**Related Issues:**
#39726 
#34780
[type-fest/issues/119](https://github.com/sindresorhus/type-fest/issues/119) *(external library, but about this this behaviour and includes adHoc fix)*

**Code**

```ts
type Arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
type Arr2 = (0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9)[]
type WhoopMyArray_Faulty<Base extends ArrayLike<any>, Condition> = {  
		[Key in keyof Base]:
			Base[Key] extends Condition
				? 'Whoop it'
				: Base[Key] extends Base[number] ? Base[Key] : never
	}

// action is performed on array elements but return type is still a proper array
type WhoopedArray = WhoopMyArray_Faulty<Arr, 7 | 5 | 2>
type WhoopedArrayKeys = WhoopMyArray_Faulty<Arr, 7 | 5 | 2>[keyof Arr]

// related side note, but not the main pont
// no action performed. in line with 1st example, expected: (0 | 1 | 'Whoop it' | 3 | 4 | 'Whoop it' | 6 | 'Whoop it' | 8 | 9)[]
type WhoopedArray2 = WhoopMyArray_Faulty<Arr2, 7 | 5 | 2>
type WhoopedArray2Keys = WhoopMyArray_Faulty<Arr, 7 | 5 | 2>[keyof Arr]
```
infered types:

```d.ts
type WhoopedArray = [0, 1, "Whoop it", 3, 4, "Whoop it", 6, "Whoop it", 8, 9]

type WhoopedArrayKeys = 0 | "Whoop it" | 1 | 3 | 4 | 6 | 8 | 9 | 10 | (() => string) | (() => string) 
  | (() => 0 | "Whoop it" | 1 | 3 | 4 | 6 | 8 | 9 | undefined) | ((...items: (0 | "Whoop it" | 1 | 3 | 4 | 6 | 8 | 9)[]) => number)
  | {    ...;    } | ... 22 more ... | (() => IterableIterator<...>)

type WhoopedArray2 = (0 | 7 | 5 | 2 | 1 | 3 | 4 | 6 | 8 | 9)[]

type WhoopedArray2Keys = 0 | "Whoop it" | 1 | 3 | 4 | 6 | 8 | 9 | 10 | (() => string) | (() => string)
  | (() => 0 | "Whoop it" | 1 | 3 | 4 | 6 | 8 | 9 | undefined) | ((...items: (0 | "Whoop it" | 1 | 3 | 4 | 6 | 8 | 9)[]) => number)
| {     ...;    } | ... 22 more ... | (() => IterableIterator<...>)
```


<details><summary><b>Output</b></summary>

```ts
"use strict";

```


</details>


<details><summary><b>Compiler Options</b></summary>

```json
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "useDefineForClassFields": true,
    "alwaysStrict": true,
    "allowUnusedLabels": true,
    "noEmitHelpers": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "preserveConstEnums": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "moduleResolution": 2,
    "target": "Latest",
    "module": "ESNext"
  }
}
```


</details>

**Playground Link:** [Provided](https://www.typescriptlang.org/play?strictPropertyInitialization=false&useDefineForClassFields=true&allowUnusedLabels=true&noEmitHelpers=true&noUnusedLocals=true&noUnusedParameters=true&esModuleInterop=false&preserveConstEnums=true&declaration=false&target=99&jsx=0&ts=4.0.0-beta#code/C4TwDgpgBAggTnKBeKcIEMAmB7AdgGxCgG0AGAGigEZKAmSgZkoBZKBWSgNkoHZKAOSgE4AugFgAUJNCQoAdQAW2bGACyIeHHQgA+gDF0AV3ygAPACF0AZ2gQAHsAi5MV2Am0AZAJYBrCKfRcEAA+SgBhPEwvYC88YOQoAG8oKEkASDTiAGkIIi9cKD8QbAAzKEsbEQAudIyKiGzckSh7R2dXCOdo2NxajIB+KAByRWUwKGihvrSq8usGnJBm1qcXOZtiXEMAWwAjCDhmwfWFpqhZ3AgANwP0gF9JSQB6J6h0AGMYvAnXSDgS7BwbYQTBQb7odxECD4CDA3DAVy7QzACa4d74QyYCCudD4fBQK64wzYsFlTTaAB0YDg2GAtPAEGkDPkShUIPJIEWrhQoxU6g5+iMJhApk0vCgAB8oGxJVBaMFiEVSm5DkA)