Merge pull request #2338 from 9rnsr/fix13077

[REG2.066a] Issue 13077 - std.range.array with shared InputRangeObject
Conflicts:
	std/array.d
Merge pull request #2339 from 9rnsr/2.066

Cherry-picking commits from master to 2.066 branch (for beta5)