I have an array and max count for something. I want to create new array like this with the above information.

Input:

```js
const maxCount = 8;
const anArray = ["P1", "P2", "P3"];

```

Wanted result:

```js
// Length is maxCount
0 = "P1" // anArray[0]
1 = null

2 = "P2" // anArray[1]
3 = null

4 = "P3" // anArray[2]
5 = null

6 = null // anArray[3] is undefined, null then
7 = null

```

Fill index if available, fill null next one. Results are group of two. Fill empty values null until reach the maxCount.

If the input:

```js
const maxCount = 8;
const anArray = ["P1", "P2", "P3", "P4", "P5"];

```

Result will be:

```js
// Length is maxCount
0 = "P1" // anArray[0]
1 = "P5" // anArray[4]

2 = "P2" // anArray[1]
3 = null

4 = "P3" // anArray[2]
5 = null

6 = "P4" // anArray[3]
7 = null

```

This result is OK too:

```js
// Length is maxCount
0 = "P1" // anArray[0]
1 = "P2" // anArray[1]

2 = "P3" // anArray[2]
3 = null

4 = "P4" // anArray[3]
5 = null

6 = "P5" // anArray[4]
7 = null

```

Every group of two must has an anArray item.